Advertisement
Guest User

settings

a guest
Mar 17th, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.90 KB | None | 0 0
  1. """
  2. Django settings for Sutora project.
  3.  
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.6/topics/settings/
  6.  
  7. For the full list of settings and their values, see
  8. https://docs.djangoproject.com/en/1.6/ref/settings/
  9. """
  10. # -*- coding: utf-8 -*-
  11. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  12. import os
  13. SITE_NAME = 'http://www.sutora.ru'
  14. BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  15. import datetime
  16. TEMPLATE_DIRS = (
  17.     os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/'),
  18. )
  19.  
  20. # -*- coding: utf-8 -*-
  21.  
  22. # Quick-start development settings - unsuitable for production
  23. # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
  24.  
  25. # SECURITY WARNING: keep the secret key used in production secret!
  26.  
  27. SECRET_KEY = 'z)vax1*%y8341uhf$-zm3ttcxkt6-%bqqmcp)4487leflpjg(q'
  28.  
  29. # SECURITY WARNING: don't run with debug turned on in production!
  30. DEBUG = True
  31.  
  32. TEMPLATE_DEBUG = True
  33.  
  34. ALLOWED_HOSTS = [
  35. '.sutora.ru',
  36. '.sutora.ru.'
  37. ]
  38.  
  39. # Application definition
  40.  
  41. INSTALLED_APPS = (
  42.     'django.contrib.admin',
  43.     'django.contrib.auth',
  44.     'django.contrib.contenttypes',
  45.     'django.contrib.sessions',
  46.     'django.contrib.messages',
  47.     'django.contrib.staticfiles',
  48.      'paypal.standard.ipn',
  49.     #'south',
  50.     #'debug_toolbar',
  51.     'mysite',
  52.     'sorl.thumbnail',
  53.     'tinymce',
  54.     'mce_filebrowser',
  55.  
  56.     'orders'
  57. )
  58.  
  59.  
  60. #mail
  61. EMAIL_HOST = 'smtp.bk.ru'
  62. EMAIL_HOST_USER = 'atnes@bk.ru'
  63. EMAIL_HOST_PASSWORD = 'atnes28637'
  64. EMAIL_PORT = 2525
  65. EMAIL_USE_TLS = True
  66.  
  67. MIDDLEWARE_CLASSES = (
  68.     'django.contrib.sessions.middleware.SessionMiddleware',
  69.     'django.middleware.common.CommonMiddleware',
  70.     'django.middleware.csrf.CsrfViewMiddleware',
  71.     'django.contrib.auth.middleware.AuthenticationMiddleware',
  72.     'django.contrib.messages.middleware.MessageMiddleware',
  73.     'django.middleware.clickjacking.XFrameOptionsMiddleware',
  74. )
  75.  
  76. ROOT_URLCONF = 'Sutora.urls'
  77. WSGI_APPLICATION = 'Sutora.wsgi.application'
  78.  
  79. TEMPLATE_CONTEXT_PROCESSORS = (
  80.     # other context processors....
  81.  
  82.     'django.core.context_processors.static',
  83.     'django.contrib.auth.context_processors.auth',
  84.     'mycontext.year_sutora.years',
  85. )
  86.  
  87. # Database
  88. # https://docs.djangoproject.com/en/1.6/ref/settings/#databases
  89. DATABASES = {
  90.     'default': {
  91.             'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
  92.             'NAME': 'u37230',                      # Or path to database file if using sqlite3.
  93.             # The following settings are not used with sqlite3:
  94.             'USER': 'u37230',
  95.             'PASSWORD': 'ops4vqzmiy',
  96.             'HOST': 'localhost',                      # Empty for localhost through domain sockets or           '127.0.0.1' for localhost through TCP.
  97.             'PORT': '',
  98.     }
  99. }
  100.  
  101.  
  102. # Internationalization
  103. # https://docs.djangoproject.com/en/1.6/topics/i18n/
  104.  
  105. LANGUAGE_CODE = 'ru'
  106.  
  107. TIME_ZONE = 'Asia/Yekaterinburg'
  108.  
  109. USE_I18N = True
  110.  
  111. USE_L10N = True
  112.  
  113. USE_TZ = True
  114.  
  115.  
  116. # Static files (CSS, JavaScript, Images)
  117. # https://docs.djangoproject.com/en/1.6/howto/static-files/
  118.  
  119. MEDIA_ROOT = '/home/u37230/sitename.ru/www/media'
  120. MEDIA_URL = '/media/'
  121. STATIC_ROOT = '/home/u37230/sitename.ru/www/static'
  122. STATIC_URL = '/static/'
  123. STATICFILES_DIRS = (
  124.     os.path.join(BASE_DIR, 'static'),
  125. )
  126. #TINYMCE
  127. TINYMCE_JS_URL = 'tiny_mce/tiny_mce.js'
  128. TINYMCE_JS_ROOT = 'tiny_mce'
  129. TINYMCE_DEFAULT_CONFIG = {'theme': "advanced",
  130.                           'theme_advanced_toolbar_location': "top",
  131.                           'height': '400',
  132.                           'skin': "o2k7",
  133.                           'file_browser_callback': 'mce_filebrowser'
  134.  
  135.  
  136.  
  137. }
  138.  
  139. YEAR = datetime.date.today().year
  140.  
  141. # PayPal
  142. PAYPAL_RECEIVER_EMAIL = "atnes-facilitator@bk.ru"
  143. PAYPAL_TEST = True
  144.  
  145.  
  146. from Sutora.default_models import set_default_models
  147.  
  148. #set_default_models()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement