|
|
|
|
@ -6,6 +6,12 @@ import os |
|
|
|
|
import sys |
|
|
|
|
from imp import find_module |
|
|
|
|
|
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
|
|
|
|
ROOT_DIR = os.path.dirname( |
|
|
|
|
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
|
|
|
|
|
|
|
|
|
print BASE_DIR |
|
|
|
|
|
|
|
|
|
path = lambda *xs: os.path.abspath(os.path.join(os.path.dirname(__file__), *xs)) |
|
|
|
|
|
|
|
|
|
sys.path.insert(1, path('..')) |
|
|
|
|
@ -21,17 +27,6 @@ ADMINS = ( |
|
|
|
|
|
|
|
|
|
MANAGERS = ADMINS |
|
|
|
|
|
|
|
|
|
DATABASES = { |
|
|
|
|
'default': { |
|
|
|
|
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
|
|
|
|
'NAME': '', # Or path to database file if using sqlite3. |
|
|
|
|
# The following settings are not used with sqlite3: |
|
|
|
|
'USER': '', |
|
|
|
|
'PASSWORD': '', |
|
|
|
|
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. |
|
|
|
|
'PORT': '', # Set to empty string for default. |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# Hosts/domain names that are valid for this site; required if DEBUG is False |
|
|
|
|
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts |
|
|
|
|
@ -66,7 +61,6 @@ USE_TZ = True |
|
|
|
|
|
|
|
|
|
# Absolute filesystem path to the directory that will hold user-uploaded files. |
|
|
|
|
# Example: "/var/www/example.com/media/" |
|
|
|
|
#MEDIA_ROOT = path('../_public_html/media') |
|
|
|
|
MEDIA_ROOT = path('../media') |
|
|
|
|
|
|
|
|
|
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
|
|
|
@ -74,7 +68,6 @@ MEDIA_ROOT = path('../media') |
|
|
|
|
# Examples: "http://example.com/media/", "http://media.example.com/" |
|
|
|
|
MEDIA_URL = '/m/' |
|
|
|
|
|
|
|
|
|
# STATIC_ROOT = path('../_public_html/static') |
|
|
|
|
STATIC_ROOT = path('../static') |
|
|
|
|
|
|
|
|
|
# URL prefix for static files. |
|
|
|
|
@ -89,23 +82,10 @@ STATICFILES_DIRS = ( |
|
|
|
|
path('static'), |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
# List of finder classes that know how to find static files in |
|
|
|
|
# various locations. |
|
|
|
|
STATICFILES_FINDERS = ( |
|
|
|
|
'django.contrib.staticfiles.finders.FileSystemFinder', |
|
|
|
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
|
|
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder', |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
# Make this unique, and don't share it with anybody. |
|
|
|
|
SECRET_KEY = 'uqrv8bpqt-#up^ay-)^@bcjjgq1^jy8qc!fkr!1wd*u%)1dg#y' |
|
|
|
|
|
|
|
|
|
# List of callables that know how to import templates from various sources. |
|
|
|
|
TEMPLATE_LOADERS = ( |
|
|
|
|
'django.template.loaders.filesystem.Loader', |
|
|
|
|
'django.template.loaders.app_directories.Loader', |
|
|
|
|
# 'django.template.loaders.eggs.Loader', |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
MIDDLEWARE_CLASSES = ( |
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware', |
|
|
|
|
@ -116,7 +96,7 @@ MIDDLEWARE_CLASSES = ( |
|
|
|
|
'django.contrib.messages.middleware.MessageMiddleware', |
|
|
|
|
# Uncomment the next line for simple clickjacking protection: |
|
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
|
|
|
'django.middleware.doc.XViewMiddleware', |
|
|
|
|
# 'django.middleware.doc.XViewMiddleware', |
|
|
|
|
'cms.middleware.page.CurrentPageMiddleware', |
|
|
|
|
'cms.middleware.user.CurrentUserMiddleware', |
|
|
|
|
'cms.middleware.toolbar.ToolbarMiddleware', |
|
|
|
|
@ -127,17 +107,54 @@ MIDDLEWARE_CLASSES = ( |
|
|
|
|
'project.customer.middleware.ProfileMiddleware', |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = ( |
|
|
|
|
# CHECK |
|
|
|
|
# MIDDLEWARE_CLASSES = ( |
|
|
|
|
# 'cms.middleware.utils.ApphookReloadMiddleware', |
|
|
|
|
# 'django.contrib.sessions.middleware.SessionMiddleware', |
|
|
|
|
# 'django.middleware.csrf.CsrfViewMiddleware', |
|
|
|
|
# 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
|
|
|
# 'django.contrib.messages.middleware.MessageMiddleware', |
|
|
|
|
# 'django.middleware.locale.LocaleMiddleware', |
|
|
|
|
# 'django.middleware.common.CommonMiddleware', |
|
|
|
|
# 'cms.middleware.user.CurrentUserMiddleware', |
|
|
|
|
# 'cms.middleware.page.CurrentPageMiddleware', |
|
|
|
|
# 'cms.middleware.toolbar.ToolbarMiddleware', |
|
|
|
|
# 'cms.middleware.language.LanguageCookieMiddleware', |
|
|
|
|
# ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEMPLATES = [ |
|
|
|
|
{ |
|
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates', |
|
|
|
|
'DIRS': [ |
|
|
|
|
# os.path.join(BASE_DIR, 'templates'), |
|
|
|
|
path('templates'), |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
'APP_DIRS': True, |
|
|
|
|
'OPTIONS': { |
|
|
|
|
'context_processors': [ |
|
|
|
|
'django.contrib.auth.context_processors.auth', |
|
|
|
|
'django.template.context_processors.debug', |
|
|
|
|
'django.template.context_processors.i18n', |
|
|
|
|
'django.template.context_processors.media', |
|
|
|
|
'django.template.context_processors.static', |
|
|
|
|
'django.template.context_processors.tz', |
|
|
|
|
'django.contrib.messages.context_processors.messages', |
|
|
|
|
'django.core.context_processors.i18n', |
|
|
|
|
'django.core.context_processors.request', |
|
|
|
|
'django.core.context_processors.media', |
|
|
|
|
'django.core.context_processors.static', |
|
|
|
|
'cms.context_processors.cms_settings', |
|
|
|
|
'django.template.context_processors.request', |
|
|
|
|
'django.template.context_processors.csrf', |
|
|
|
|
'sekizai.context_processors.sekizai', |
|
|
|
|
'project.callback.context_processors.add_forms', |
|
|
|
|
'project.customer.context_processors.license_check_soon_ends', |
|
|
|
|
'cms.context_processors.cms_settings', |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
TEMPLATE_DIRS = ( |
|
|
|
|
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
|
|
|
# Always use forward slashes, even on Windows. |
|
|
|
|
# Don't forget to use absolute paths, not relative paths. |
|
|
|
|
path('templates'), |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -146,25 +163,22 @@ ROOT_URLCONF = 'project.urls' |
|
|
|
|
# Python dotted path to the WSGI application used by Django's runserver. |
|
|
|
|
WSGI_APPLICATION = 'project.wsgi.application' |
|
|
|
|
|
|
|
|
|
TEMPLATE_DIRS = ( |
|
|
|
|
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
|
|
|
# Always use forward slashes, even on Windows. |
|
|
|
|
# Don't forget to use absolute paths, not relative paths. |
|
|
|
|
path('templates'), |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
INSTALLED_APPS = ( |
|
|
|
|
|
|
|
|
|
'myauth', |
|
|
|
|
'djangocms_admin_style', |
|
|
|
|
'django.contrib.admin', |
|
|
|
|
'django.contrib.auth', |
|
|
|
|
'django.contrib.contenttypes', |
|
|
|
|
'django.contrib.sessions', |
|
|
|
|
'django.contrib.sites', |
|
|
|
|
'django.contrib.messages', |
|
|
|
|
'django.contrib.sites', |
|
|
|
|
'django.contrib.sitemaps', |
|
|
|
|
'django.contrib.staticfiles', |
|
|
|
|
# Uncomment the next line to enable the admin: |
|
|
|
|
'django.contrib.admindocs', |
|
|
|
|
|
|
|
|
|
'pytils', |
|
|
|
|
# 'sorl.thumbnail', |
|
|
|
|
# 'django_filters', |
|
|
|
|
'autocomplete_light', |
|
|
|
|
'cms', # django CMS itself |
|
|
|
|
'mptt', # utilities for implementing a modified pre-order traversal tree |
|
|
|
|
@ -172,41 +186,19 @@ INSTALLED_APPS = ( |
|
|
|
|
'sekizai', # for javascript and css management |
|
|
|
|
'captcha', |
|
|
|
|
'yandex_money', |
|
|
|
|
'djangocms_admin_style', # for the admin skin. You **must** add 'djangocms_admin_style' in the list before 'django.contrib.admin'. |
|
|
|
|
'django.contrib.messages', # to enable messages framework (see :ref:`Enable messages <enable-messages>`) |
|
|
|
|
'filer', |
|
|
|
|
'easy_thumbnails', |
|
|
|
|
'djangocms_file', |
|
|
|
|
'djangocms_flash', |
|
|
|
|
'djangocms_googlemap', |
|
|
|
|
'djangocms_inherit', |
|
|
|
|
'djangocms_picture', |
|
|
|
|
'djangocms_teaser', |
|
|
|
|
'djangocms_video', |
|
|
|
|
'djangocms_link', |
|
|
|
|
'djangocms_snippet', |
|
|
|
|
'djangocms_text_ckeditor', |
|
|
|
|
'cmsplugin_filer_file', |
|
|
|
|
'cmsplugin_filer_folder', |
|
|
|
|
'cmsplugin_filer_link', |
|
|
|
|
'cmsplugin_filer_image', |
|
|
|
|
'cmsplugin_filer_teaser', |
|
|
|
|
'cmsplugin_filer_video', |
|
|
|
|
'djangocms_ckeditor_filer', |
|
|
|
|
'django.contrib.admin', |
|
|
|
|
'django.contrib.admindocs', |
|
|
|
|
'treebeard', |
|
|
|
|
|
|
|
|
|
# my apps |
|
|
|
|
'project.commons', |
|
|
|
|
'project.myauth', |
|
|
|
|
'project.customer', |
|
|
|
|
'project.docs', |
|
|
|
|
'project.pages', |
|
|
|
|
'project.callback', |
|
|
|
|
'project.index_blocks', |
|
|
|
|
|
|
|
|
|
# keep it last |
|
|
|
|
'south', |
|
|
|
|
|
|
|
|
|
'commons', |
|
|
|
|
'customer', |
|
|
|
|
'docs', |
|
|
|
|
'pages', |
|
|
|
|
'callback', |
|
|
|
|
# 'project.index_blocks', |
|
|
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
AUTH_USER_MODEL = 'myauth.DokUser' |
|
|
|
|
@ -334,6 +326,7 @@ CKEDITOR_SETTINGS = { |
|
|
|
|
'removePlugins': 'image' |
|
|
|
|
} |
|
|
|
|
TEXT_SAVE_IMAGE_FUNCTION = 'cmsplugin_filer_image.integrations.ckeditor.create_image_plugin' |
|
|
|
|
|
|
|
|
|
THUMBNAIL_PROCESSORS = ( |
|
|
|
|
'easy_thumbnails.processors.colorspace', |
|
|
|
|
'easy_thumbnails.processors.autocrop', |
|
|
|
|
|