#!/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 = True ALLOWED_HOSTS = [] # Application definition ROOT_URLCONF = 'zsite.urls' WSGI_APPLICATION = 'zsite.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', ), 'output_filename': 'js/*.js', }, 'vendor': { 'source_filenames': ( 'vendor/angular/angular.js', 'vendor/angular-bootstrap/ui-bootstrap.js' ), 'output_filename': 'js/vendor.js', } } PIPELINE_CSS = { 'main': { 'source_filenames': ( 'less/*.less', ), 'output_filename': 'css/main.css', } } SITE_ID = 1 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', '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' ) 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' ) 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', 'reversion', 'pipeline', 'zsite' ) LANGUAGES = ( ## Customize this ('ru', u'Русский'), ('en', u'English'), ) 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'), ('feature.html', 'Page with Feature') ) CMS_PERMISSION = True CMS_PLACEHOLDER_CONF = {} DATABASES = { 'default': {'ENGINE': 'django.db.backends.mysql', 'NAME': u'zuykov', 'HOST': u'localhost', 'USER': u'root', 'PASSWORD': '', 'PORT': ''} } 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' }