Prod fix for static build

master
Alexander Kondratyev 9 years ago
parent fa0af39b3f
commit 42c3939c3e
  1. 2
      app/requirements.txt
  2. 77
      app/settings.py
  3. 1
      packages/smartsnippets/static/libs/ace/css/images/meteorshower2.jpg
  4. 1
      packages/smartsnippets/static/libs/ace/css/images/pattern.jpg

@ -24,7 +24,7 @@ django-mptt==0.7.4
django-multipleformwizard==0.2.16
django-parler==1.5.1
django-phonenumber-field==0.7.2
django-pipeline==1.5.1
django-pipeline==1.6.12
django-polymorphic==0.7.2
django-reversion==1.9.3
django-sekizai==0.8.2

@ -5,28 +5,31 @@
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DATA_DIR = BASE_DIR
# Load from ./packages
import sys
sys.path.append(BASE_DIR + '/packages')
# 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 = False
# Prod
DEBUG = True
TEMPLATE_DEBUG = False
# ALLOWED_HOSTS = [
# '.zuykov.com', # Allow domain and subdomains
# '.zuykov.com.', # Also allow FQDN and subdomains
# ]
ALLOWED_HOSTS = [
'.zuykov.com', # Allow domain and subdomains
'.zuykov.com.', # Also allow FQDN and subdomains
]
# Dev
# DEBUG = True
# TEMPLATE_DEBUG = False
# Application definition
PROJECT_NAME = 'zuykov'
SERVER_USERNAME = 'web'
@ -35,6 +38,8 @@ ENV_DIR = '%s/env' % PROJECT_DIR
LOGS_DIR = '~/logs'
ACTIVATE = '. %s/bin/activate' % ENV_DIR
# Repository
REPOSITORY = 'git@github.com:fefa4ka/zuykov.git'
GIT_USERNAME = 'fefa4ka'
ADMIN_EMAIL = 'fefa4ka@gmail.com'
@ -42,6 +47,7 @@ GIT_KEY_PATH = '/Users/fefa4ka/.ssh/deploy_rsa'
GIT_KEY_NAME = 'github_rsa'
# Mail
EMAIL_HOST = 'mail.zuykov.com'
EMAIL_HOST_PASSWORD = 'cJpaXGTzi324129'
EMAIL_PORT = 25
@ -49,6 +55,7 @@ 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'
@ -75,7 +82,6 @@ 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')
@ -87,19 +93,16 @@ STATICFILES_DIRS = (
)
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
# 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'pipeline.finders.FileSystemFinder',
# 'pipeline.finders.AppDirectoriesFinder',
# 'pipeline.finders.CachedFileFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'pipeline.finders.PipelineFinder',
)
PIPELINE_COMPILERS = (
'pipeline.compilers.less.LessCompiler',
)
PIPELINE_JS = {
PIPELINE = {
'PIPELINE_ENABLED': True,
'JAVASCRIPT': {
'main': {
'source_filenames': (
'js/*.js',
@ -118,11 +121,8 @@ PIPELINE_JS = {
),
'output_filename': 'js/vendor.js',
}
}
# PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
# PIPELINE_YUI_BINARY = '/usr/bin/yui-compressor'
PIPELINE_CSS = {
},
'STYLESHEETS': {
'main': {
'source_filenames': (
'less/main.less',
@ -132,16 +132,25 @@ PIPELINE_CSS = {
'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',
PIPELINE['COMPILERS'] = (
'pipeline.compilers.less.LessCompiler',
)
# PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
# PIPELINE_YUI_BINARY = '/usr/bin/yui-compressor'
# PIPELINE_CSS = {
# 'main': {
# 'source_filenames': (
# 'less/main.less',
# 'trademark/less/main.less',
# 'vendor/font-awesome/less/font-awesome.less',
# ),
# 'output_filename': 'css/main.css',
# }
# }
SITE_ID = 1
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
@ -165,6 +174,13 @@ MIDDLEWARE_CLASSES = (
'pipeline.middleware.MinifyHTMLMiddleware',
)
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',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
@ -178,7 +194,6 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.static',
'cms.context_processors.cms_settings',
'aldryn_boilerplates.context_processors.boilerplate',
)
CACHES = {

Loading…
Cancel
Save