Advertisement
Guest User

Untitled

a guest
Jun 7th, 2017
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.19 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 = True
  32.  
  33. ALLOWED_HOSTS = ['zdkvartira.ru', 'www.zdkvartira.ru', 'dev.zdkvartira.ru', 'www.dev.zdkvartira.ru', 'dev1.zdkvartira.ru', 'localhost']
  34.  
  35.  
  36.  
  37. # Application definition
  38.  
  39. INSTALLED_APPS = [
  40. 'django.contrib.admin',
  41. 'django.contrib.auth',
  42. 'django.contrib.contenttypes',
  43. 'django.contrib.sessions',
  44. 'django.contrib.messages',
  45. 'django.contrib.staticfiles',
  46. 'news',
  47. 'newly',
  48. 'staff',
  49. 'secondaryflats',
  50. 'reviews',
  51. 'webforms',
  52. 'pages',
  53. 'remont'
  54. ]
  55.  
  56. MIDDLEWARE_CLASSES = [
  57. 'django.middleware.security.SecurityMiddleware',
  58. 'django.contrib.sessions.middleware.SessionMiddleware',
  59. 'django.middleware.common.CommonMiddleware',
  60. 'django.middleware.csrf.CsrfViewMiddleware',
  61. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  62. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  63. 'django.contrib.messages.middleware.MessageMiddleware',
  64. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  65. ]
  66.  
  67. if DEBUG:
  68. EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  69. else:
  70. EMAIL_HOST = 'localhost'
  71. EMAIL_PORT = 25
  72. EMAIL_HOST_USER = ''
  73. EMAIL_HOST_PASSWORD = ''
  74. EMAIL_USE_TLS = False
  75.  
  76. MAIL_RECIPIENTS = [
  77. 'pablodiguerero@gmail.com',
  78. 'p.ivanov@it-lab.su',
  79. 'igorpalatov@mail.ru'
  80. ]
  81.  
  82. ROOT_URLCONF = 'zdkvartira.urls'
  83.  
  84. TEMPLATES = [
  85. {
  86. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  87. 'DIRS': [os.path.join(BASE_DIR, 'templates')],
  88. 'APP_DIRS': True,
  89. 'OPTIONS': {
  90. 'context_processors': [
  91. 'django.template.context_processors.debug',
  92. 'django.template.context_processors.request',
  93. 'django.contrib.auth.context_processors.auth',
  94. 'django.contrib.messages.context_processors.messages',
  95. ],
  96. },
  97. },
  98. ]
  99.  
  100. WSGI_APPLICATION = 'zdkvartira.wsgi.application'
  101.  
  102. # Database
  103. # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
  104.  
  105. DATABASES = {
  106. 'default': {
  107. 'ENGINE': 'django.db.backends.postgresql_psycopg2',
  108. 'NAME': 'dev_zdkvartira',
  109. 'USER': 'dev_zdkvartira',
  110. 'PASSWORD': 'cKq${kUW',
  111. 'HOST': '46.36.221.104',
  112. 'PORT': '',
  113. }
  114. }
  115.  
  116. CACHES = {
  117. 'default': {
  118. 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
  119. 'LOCATION': 'unique-snowflake',
  120. 'TIMEOUT': 10
  121. }
  122. }
  123.  
  124. # Password validation
  125. # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
  126.  
  127. AUTH_PASSWORD_VALIDATORS = [
  128. {
  129. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  130. },
  131. {
  132. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  133. },
  134. {
  135. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  136. },
  137. {
  138. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  139. },
  140. ]
  141.  
  142.  
  143. # Internationalization
  144. # https://docs.djangoproject.com/en/1.9/topics/i18n/
  145.  
  146. LANGUAGE_CODE = 'ru'
  147.  
  148. TIME_ZONE = 'UTC'
  149.  
  150. USE_I18N = True
  151.  
  152. USE_L10N = True
  153.  
  154. USE_TZ = True
  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.  
  180.  
  181. if DEBUG:
  182. # STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  183. MEDIA_ROOT = os.path.join(BASE_DIR, 'static', 'uploads')
  184. FONT_ROOT = os.path.join(BASE_DIR, 'static', 'fonts')
  185. else:
  186. MEDIA_ROOT = '/home/django/dev1.zdkvartira.ru/files/media'
  187. STATIC_ROOT = '/home/django/dev1.zdkvartira.ru/files/static'
  188. FONT_ROOT = STATIC_ROOT+"/fonts"
  189.  
  190. PDF_LOGIN = 'zdkvartira'
  191. PDF_PASSWD = 'b079efa5b908337c174fc52985c885c7'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement