You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

389 lines
10 KiB

#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
gettext = lambda s: s
DATA_DIR = os.path.dirname(os.path.dirname(__file__))
"""
Django settings for zsite project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '=%%a@whz46w1#=8ffk^a+8vya5fg-kz0ztyz!_@hdg-(5a9q+s'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
'.zuykov.com', # Allow domain and subdomains
'.zuykov.com.', # Also allow FQDN and subdomains
]
# Application definition
PROJECT_NAME = 'zuykov'
SERVER_USERNAME = 'web'
PROJECT_DIR = '~/' + PROJECT_NAME
ENV_DIR = '%s/env' % PROJECT_DIR
LOGS_DIR = '~/logs'
ACTIVATE = '. %s/bin/activate' % ENV_DIR
REPOSITORY = 'git@github.com:fefa4ka/zuykov.git'
GIT_USERNAME = 'fefa4ka'
ADMIN_EMAIL = 'fefa4ka@gmail.com'
GIT_KEY_PATH = '/Users/fefa4ka/.ssh/deploy_rsa'
GIT_KEY_NAME = 'github_rsa'
EMAIL_HOST = 'mail.zuykov.com'
EMAIL_HOST_PASSWORD = 'cJpaXGTzi324'
EMAIL_PORT = 25
EMAIL_USE_TLS = False
EMAIL_HOST_USER = "info@zuykov.com"
DEFAULT_FROM_EMAIL = u"Зуйков и партнёры <info@zuykov.com>"
ROOT_URLCONF = 'app.urls'
WSGI_APPLICATION = 'app.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
LANGUAGE_CODE = 'ru'
TIME_ZONE = 'Europe/Moscow'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
STATIC_ROOT = os.path.join(DATA_DIR, 'static')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'zsite', 'static'),
)
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'pipeline.finders.PipelineFinder',
)
PIPELINE_COMPILERS = (
'pipeline.compilers.less.LessCompiler',
)
PIPELINE_JS = {
'main': {
'source_filenames': (
'js/app.js',
'js/forms.js',
'js/snippets.js',
'js/nice.js'
),
'output_filename': 'js/zuykov.js',
},
'vendor': {
'source_filenames': (
'vendor/angular/angular.js',
'vendor/angular-bootstrap/ui-bootstrap.js',
'vendor/angular-bootstrap/ui-bootstrap-tpls.js',
'vendor/jquery/dist/jquery.min.js',
'vendor/jquery.inputmask/dist/inputmask/inputmask.js',
'vendor/jquery.inputmask/dist/inputmask/jquery.inputmask.js',
),
'output_filename': 'js/vendor.js',
}
}
# PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
# PIPELINE_YUI_BINARY = '/usr/bin/yui-compressor'
PIPELINE_CSS = {
'main': {
'source_filenames': (
'less/main.less',
),
'output_filename': 'css/main.css',
}
}
SITE_ID = 1
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
# important! place right before django.template.loaders.app_directories.Loader
'aldryn_boilerplates.template_loaders.AppDirectoriesLoader',
'django.template.loaders.app_directories.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'country_segment.middleware.ResolveCountryCodeMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.common.CommonMiddleware',
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.i18n',
'django.core.context_processors.debug',
'django.core.context_processors.request',
'django.core.context_processors.media',
'django.core.context_processors.csrf',
'django.core.context_processors.tz',
'sekizai.context_processors.sekizai',
'django.core.context_processors.static',
'cms.context_processors.cms_settings',
'aldryn_boilerplates.context_processors.boilerplate',
)
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
}
# TEMPLATES = [
# {
# 'BACKEND': 'django.template.backends.django.DjangoTemplates',
# '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.template.context_processors.csrf',
# 'django.template.context_processors.request',
# "django.contrib.messages.context_processors.messages"
# 'sekizai.context_processors.sekizai',
# 'cms.context_processors.cms_settings'
# )
# }
# },
# ]
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'zsite', 'templates'),
)
INSTALLED_APPS = (
'djangocms_admin_style',
'djangocms_text_ckeditor',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.sites',
'django.contrib.sitemaps',
'django.contrib.staticfiles',
'django.contrib.messages',
'cms',
'menus',
'sekizai',
'treebeard',
'djangocms_style',
'djangocms_column',
'djangocms_file',
'djangocms_flash',
'djangocms_googlemap',
'djangocms_inherit',
'djangocms_link',
'djangocms_picture',
'djangocms_teaser',
'djangocms_video',
'aldryn_segmentation',
'country_segment',
'reversion',
'pipeline',
'zsite',
# People
'aldryn_common',
'aldryn_people',
'easy_thumbnails',
'filer',
'parler',
'sortedm2m',
# 'easy_thumbnails',
'cmsplugin_filer_image',
'cmsplugin_tabs',
# 'parler',
'taggit',
'taggit_autosuggest',
'django_select2',
'meta',
'meta_mixin',
'admin_enhancer',
'blog',
'aldryn_bootstrap3',
# 'debug_toolbar',
'djangocms_forms',
'smartsnippets',
'easy_select2',
)
SOUTH_MIGRATION_MODULES = {
'easy_thumbnails': 'easy_thumbnails.south_migrations',
'taggit': 'taggit.south_migrations',
}
META_SITE_PROTOCOL = 'http'
META_USE_SITES = True
PARLER_LANGUAGES = {
1: (
{'code': 'en',},
{'code': 'ru',},
),
}
ALDRYN_BOILERPLATE_NAME = 'bootstrap3'
THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
# 'easy_thumbnails.processors.scale_and_crop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters',
'easy_thumbnails.processors.background',
)
LANGUAGES = (
## Customize this
('ru', u'Русский'),
('en', u'English'),
)
LOCALE_PATHS = (
BASE_DIR + '/zsite/locale', )
CMS_LANGUAGES = {
## Customize this
'default': {
'public': True,
'hide_untranslated': False,
'redirect_on_fallback': True,
},
1: [
{
'public': True,
'code': 'ru',
'hide_untranslated': False,
'name': u'Русский',
'redirect_on_fallback': True,
},
{
'public': True,
'code': 'en',
'hide_untranslated': False,
'name': u'English',
'redirect_on_fallback': True,
},
],
}
CMS_TEMPLATES = (
## Customize this
('page.html', 'Page'),
('sub_section.html', 'Service main page'),
('theory.html', 'Theory page'),
('about.html', 'About company section'),
)
DJANGOCMS_FORMS_TEMPLATES = (
('djangocms_forms/form_template/default.html', 'Default'),
('form_template/consultation.html', 'Consultation'),
('form_template/product_class.html', 'Trademark Product Class'),
)
CMS_PERMISSION = True
CMS_PLACEHOLDER_CONF = {}
DATABASES = {
'default':
{'ENGINE': 'django.db.backends.mysql', 'NAME': u'zuykov', 'HOST': u'localhost', 'USER': u'root', 'PASSWORD': '', 'PORT': ''}
}
MYSQL_USER = DATABASES['default']['USER']
MYSQL_PASSWORD = DATABASES['default']['PASSWORD']
MIGRATION_MODULES = {
'djangocms_column': 'djangocms_column.migrations_django',
'djangocms_flash': 'djangocms_flash.migrations_django',
'djangocms_googlemap': 'djangocms_googlemap.migrations_django',
'djangocms_inherit': 'djangocms_inherit.migrations_django',
'djangocms_link': 'djangocms_link.migrations_django',
'djangocms_style': 'djangocms_style.migrations_django',
'djangocms_file': 'djangocms_file.migrations_django',
'djangocms_picture': 'djangocms_picture.migrations_django',
'djangocms_teaser': 'djangocms_teaser.migrations_django',
'djangocms_video': 'djangocms_video.migrations_django',
'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django'
}
CKEDITOR_SETTINGS = {
'toolbar_HTMLField': [
['Undo', 'Redo'],
['ShowBlocks'],
['Format', 'Image'],
],
'skin': 'moono',
}