Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.83 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # ~ Author: Pavel Ivanov
  4. # ~ Date: ะ˜ัŽะปัŒ 2016
  5.  
  6. """
  7. Django settings for zdkvartira project.
  8.  
  9. Generated by 'django-admin startproject' using Django 1.9.4.
  10.  
  11. For more information on this file, see
  12. https://docs.djangoproject.com/en/1.9/topics/settings/
  13.  
  14. For the full list of settings and their values, see
  15. https://docs.djangoproject.com/en/1.9/ref/settings/
  16. """
  17.  
  18. import os
  19.  
  20. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  21. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  22.  
  23.  
  24. # Quick-start development settings - unsuitable for production
  25. # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
  26.  
  27. # SECURITY WARNING: keep the secret key used in production secret!
  28. SECRET_KEY = 'xhp%q0vvexvsv58lz)a8e#-g77g232kkonz6turp2q+1q(lc(9'
  29.  
  30. # SECURITY WARNING: don't run with debug turned on in production!
  31. DEBUG = False
  32.  
  33. ALLOWED_HOSTS = ['zdkvartira.ru', 'www.zdkvartira.ru', 'dev.zdkvartira.ru', 'www.dev.zdkvartira.ru', 'dev1.zdkvartira.ru']
  34.  
  35.  
  36. # Application definition
  37.  
  38. INSTALLED_APPS = [
  39. 'django.contrib.admin',
  40. 'django.contrib.auth',
  41. 'django.contrib.contenttypes',
  42. 'django.contrib.sessions',
  43. 'django.contrib.messages',
  44. 'django.contrib.staticfiles',
  45. 'news',
  46. 'newly',
  47. 'staff',
  48. 'secondaryflats',
  49. 'reviews',
  50. 'webforms',
  51. 'pages',
  52. 'remont'
  53. ]
  54.  
  55. MIDDLEWARE_CLASSES = [
  56. 'django.middleware.security.SecurityMiddleware',
  57. 'django.contrib.sessions.middleware.SessionMiddleware',
  58. 'django.middleware.common.CommonMiddleware',
  59. 'django.middleware.csrf.CsrfViewMiddleware',
  60. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  61. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  62. 'django.contrib.messages.middleware.MessageMiddleware',
  63. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  64. ]
  65.  
  66. if DEBUG:
  67. EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  68. else:
  69. EMAIL_HOST = 'localhost'
  70. EMAIL_PORT = 25
  71. EMAIL_HOST_USER = ''
  72. EMAIL_HOST_PASSWORD = ''
  73. EMAIL_USE_TLS = False
  74.  
  75. MAIL_RECIPIENTS = [
  76. 'pablodiguerero@gmail.com',
  77. 'p.ivanov@it-lab.su',
  78. 'igorpalatov@mail.ru'
  79. ]
  80.  
  81. ROOT_URLCONF = 'zdkvartira.urls'
  82.  
  83. TEMPLATES = [
  84. {
  85. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  86. 'DIRS': [os.path.join(BASE_DIR, 'templates')],
  87. 'APP_DIRS': True,
  88. 'OPTIONS': {
  89. 'context_processors': [
  90. 'django.template.context_processors.debug',
  91. 'django.template.context_processors.request',
  92. 'django.contrib.auth.context_processors.auth',
  93. 'django.contrib.messages.context_processors.messages',
  94. 'pages.context_processors.favorites_link',
  95. 'pages.context_processors.compare_link',
  96. ],
  97. },
  98. },
  99. ]
  100.  
  101. WSGI_APPLICATION = 'zdkvartira.wsgi.application'
  102.  
  103.  
  104. # Database
  105. # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
  106.  
  107. DATABASES = {
  108. 'default': {
  109. 'ENGINE': 'django.db.backends.postgresql_psycopg2',
  110. 'NAME': 'dev_zdkvartira',
  111. 'USER': 'dev_zdkvartira',
  112. 'PASSWORD': 'cKq${kUW',
  113. 'HOST': '46.36.221.104',
  114. 'PORT': '',
  115. }
  116. }
  117.  
  118. CACHES = {
  119. 'default': {
  120. 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
  121. 'LOCATION': 'unique-snowflake',
  122. 'TIMEOUT': 10
  123. }
  124. }
  125.  
  126. # Password validation
  127. # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
  128.  
  129. AUTH_PASSWORD_VALIDATORS = [
  130. {
  131. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  132. },
  133. {
  134. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  135. },
  136. {
  137. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  138. },
  139. {
  140. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  141. },
  142. ]
  143.  
  144.  
  145. # Internationalization
  146. # https://docs.djangoproject.com/en/1.9/topics/i18n/
  147.  
  148. LANGUAGE_CODE = 'ru'
  149.  
  150. TIME_ZONE = 'UTC'
  151.  
  152. USE_I18N = True
  153.  
  154. USE_L10N = True
  155.  
  156. USE_TZ = True
  157.  
  158.  
  159. # Static files (CSS, JavaScript, Images)
  160. # https://docs.djangoproject.com/en/1.9/howto/static-files/
  161.  
  162. STATICFILES_DIRS = (
  163. os.path.join(BASE_DIR, 'static'),
  164. )
  165.  
  166. if DEBUG:
  167. STATIC_URL = '/static/'
  168. MEDIA_URL = '/static/uploads/'
  169. else:
  170. STATIC_URL = '/static/'
  171. MEDIA_URL = '/media/'
  172.  
  173. CRM_URL_EXPORT_SALE = "http://5.45.121.35/work/exp/files/SITE/db.xml"
  174. CRM_URL_EXPORT_RENT = "http://5.45.121.35/work/exp/files/SITE/db2.xml"
  175. CRM_URL_NEWS = "http://miel.vznode.ru/news.xml"
  176. CRM_URL_PHRASE = "http://miel.vznode.ru/phrase.xml"
  177. CRM_URL_PRESS = "http://miel.vznode.ru/press.xml"
  178. CRM_URL_ANALYTICS = "http://miel.vznode.ru/analytics.xml"
  179.  
  180. SPHINX_DB = 'dev_zdkvartira'
  181.  
  182. if DEBUG:
  183. STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  184. MEDIA_ROOT = os.path.join(BASE_DIR, 'static', 'uploads')
  185. FONT_ROOT = os.path.join(BASE_DIR, 'static', 'fonts')
  186. else:
  187. MEDIA_ROOT = '/home/django/dev1.zdkvartira.ru/files/media'
  188. STATIC_ROOT = '/home/django/dev1.zdkvartira.ru/files/static'
  189. FONT_ROOT = STATIC_ROOT + "/fonts"
  190. PDF_LOGIN = 'zdkvartira'
  191. PDF_PASSWD = 'b079efa5b908337c174fc52985c885c7'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement