Guest User

Untitled

a guest
Apr 20th, 2018
484
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. ]
  77.  
  78. ROOT_URLCONF = 'zdkvartira.urls'
  79.  
  80. TEMPLATES = [
  81. {
  82. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  83. 'DIRS': [os.path.join(BASE_DIR, 'templates')],
  84. 'APP_DIRS': True,
  85. 'OPTIONS': {
  86. 'context_processors': [
  87. 'django.template.context_processors.debug',
  88. 'django.template.context_processors.request',
  89. 'django.contrib.auth.context_processors.auth',
  90. 'django.contrib.messages.context_processors.messages',
  91. 'pages.context_processors.favorites_link',
  92. 'pages.context_processors.compare_link',
  93. ],
  94. },
  95. },
  96. ]
  97.  
  98. WSGI_APPLICATION = 'zdkvartira.wsgi.application'
  99.  
  100.  
  101. # Database
  102. # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
  103.  
  104. DATABASES = {
  105. 'default': {
  106. 'ENGINE': 'django.db.backends.postgresql_psycopg2',
  107. 'NAME': 'dev_zdkvartira',
  108. 'USER': 'dev_zdkvartira',
  109. 'PASSWORD': 'cKq${kUW',
  110. 'HOST': '46.36.221.104',
  111. 'PORT': '',
  112. }
  113. }
  114.  
  115. CACHES = {
  116. 'default': {
  117. 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
  118. 'LOCATION': 'unique-snowflake',
  119. 'TIMEOUT': 10
  120. }
  121. }
  122.  
  123. # Password validation
  124. # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
  125.  
  126. AUTH_PASSWORD_VALIDATORS = [
  127. {
  128. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  129. },
  130. {
  131. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  132. },
  133. {
  134. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  135. },
  136. {
  137. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  138. },
  139. ]
  140.  
  141.  
  142. # Internationalization
  143. # https://docs.djangoproject.com/en/1.9/topics/i18n/
  144.  
  145. LANGUAGE_CODE = 'ru'
  146.  
  147. TIME_ZONE = 'UTC'
  148.  
  149. USE_I18N = True
  150.  
  151. USE_L10N = True
  152.  
  153. USE_TZ = True
  154.  
  155.  
  156. # Static files (CSS, JavaScript, Images)
  157. # https://docs.djangoproject.com/en/1.9/howto/static-files/
  158.  
  159. STATICFILES_DIRS = (
  160. os.path.join(BASE_DIR, 'static'),
  161. )
  162.  
  163. if DEBUG:
  164. STATIC_URL = '/static/'
  165. MEDIA_URL = '/static/uploads/'
  166. else:
  167. STATIC_URL = '/static/'
  168. MEDIA_URL = '/media/'
  169.  
  170. CRM_URL_EXPORT_SALE = "http://5.45.121.35/work/exp/files/SITE/db.xml"
  171. CRM_URL_EXPORT_RENT = "http://5.45.121.35/work/exp/files/SITE/db2.xml"
  172. CRM_URL_NEWS = "http://miel.vznode.ru/news.xml"
  173. CRM_URL_PHRASE = "http://miel.vznode.ru/phrase.xml"
  174. CRM_URL_PRESS = "http://miel.vznode.ru/press.xml"
  175. CRM_URL_ANALYTICS = "http://miel.vznode.ru/analytics.xml"
  176.  
  177. SPHINX_DB = 'dev_zdkvartira'
  178.  
  179. if DEBUG:
  180. STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  181. MEDIA_ROOT = os.path.join(BASE_DIR, 'static', 'uploads')
  182. FONT_ROOT = os.path.join(BASE_DIR, 'static', 'fonts')
  183. else:
  184. MEDIA_ROOT = '/home/django/dev1.zdkvartira.ru/files/media'
  185. STATIC_ROOT = '/home/django/dev1.zdkvartira.ru/files/static'
  186. FONT_ROOT = STATIC_ROOT + "/fonts"
  187. PDF_LOGIN = 'zdkvartira'
  188. PDF_PASSWD = 'b079efa5b908337c174fc52985c885c7'
Advertisement
Add Comment
Please, Sign In to add comment