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-multipleformwizard==0.2.16
django-parler==1.5.1 django-parler==1.5.1
django-phonenumber-field==0.7.2 django-phonenumber-field==0.7.2
django-pipeline==1.5.1 django-pipeline==1.6.12
django-polymorphic==0.7.2 django-polymorphic==0.7.2
django-reversion==1.9.3 django-reversion==1.9.3
django-sekizai==0.8.2 django-sekizai==0.8.2

@ -5,28 +5,31 @@
import os import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DATA_DIR = BASE_DIR DATA_DIR = BASE_DIR
# Load from ./packages
import sys import sys
sys.path.append(BASE_DIR + '/packages') 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! # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '=%%a@whz46w1#=8ffk^a+8vya5fg-kz0ztyz!_@hdg-(5a9q+s' SECRET_KEY = '=%%a@whz46w1#=8ffk^a+8vya5fg-kz0ztyz!_@hdg-(5a9q+s'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
# Prod
DEBUG = True
TEMPLATE_DEBUG = False TEMPLATE_DEBUG = False
# ALLOWED_HOSTS = [
# '.zuykov.com', # Allow domain and subdomains
# '.zuykov.com.', # Also allow FQDN and subdomains
# ]
ALLOWED_HOSTS = [ # Dev
'.zuykov.com', # Allow domain and subdomains # DEBUG = True
'.zuykov.com.', # Also allow FQDN and subdomains # TEMPLATE_DEBUG = False
]
# Application definition # Application definition
PROJECT_NAME = 'zuykov' PROJECT_NAME = 'zuykov'
SERVER_USERNAME = 'web' SERVER_USERNAME = 'web'
@ -35,6 +38,8 @@ ENV_DIR = '%s/env' % PROJECT_DIR
LOGS_DIR = '~/logs' LOGS_DIR = '~/logs'
ACTIVATE = '. %s/bin/activate' % ENV_DIR ACTIVATE = '. %s/bin/activate' % ENV_DIR
# Repository
REPOSITORY = 'git@github.com:fefa4ka/zuykov.git' REPOSITORY = 'git@github.com:fefa4ka/zuykov.git'
GIT_USERNAME = 'fefa4ka' GIT_USERNAME = 'fefa4ka'
ADMIN_EMAIL = 'fefa4ka@gmail.com' ADMIN_EMAIL = 'fefa4ka@gmail.com'
@ -42,6 +47,7 @@ GIT_KEY_PATH = '/Users/fefa4ka/.ssh/deploy_rsa'
GIT_KEY_NAME = 'github_rsa' GIT_KEY_NAME = 'github_rsa'
# Mail
EMAIL_HOST = 'mail.zuykov.com' EMAIL_HOST = 'mail.zuykov.com'
EMAIL_HOST_PASSWORD = 'cJpaXGTzi324129' EMAIL_HOST_PASSWORD = 'cJpaXGTzi324129'
EMAIL_PORT = 25 EMAIL_PORT = 25
@ -49,6 +55,7 @@ EMAIL_USE_TLS = False
EMAIL_HOST_USER = "info@zuykov.com" EMAIL_HOST_USER = "info@zuykov.com"
DEFAULT_FROM_EMAIL = u"Зуйков и партнёры <info@zuykov.com>" DEFAULT_FROM_EMAIL = u"Зуйков и партнёры <info@zuykov.com>"
ROOT_URLCONF = 'app.urls' ROOT_URLCONF = 'app.urls'
WSGI_APPLICATION = 'app.wsgi.application' WSGI_APPLICATION = 'app.wsgi.application'
@ -75,7 +82,6 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/ # https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = '/static/'
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(DATA_DIR, 'media') MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
@ -87,19 +93,16 @@ STATICFILES_DIRS = (
) )
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage' STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATICFILES_FINDERS = ( STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.FileSystemFinder',
# 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'pipeline.finders.FileSystemFinder',
# 'pipeline.finders.AppDirectoriesFinder',
# 'pipeline.finders.CachedFileFinder',
'pipeline.finders.PipelineFinder', 'pipeline.finders.PipelineFinder',
) )
PIPELINE_COMPILERS = ( PIPELINE = {
'pipeline.compilers.less.LessCompiler', 'PIPELINE_ENABLED': True,
) 'JAVASCRIPT': {
PIPELINE_JS = {
'main': { 'main': {
'source_filenames': ( 'source_filenames': (
'js/*.js', 'js/*.js',
@ -118,11 +121,8 @@ PIPELINE_JS = {
), ),
'output_filename': 'js/vendor.js', 'output_filename': 'js/vendor.js',
} }
},
} 'STYLESHEETS': {
# PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
# PIPELINE_YUI_BINARY = '/usr/bin/yui-compressor'
PIPELINE_CSS = {
'main': { 'main': {
'source_filenames': ( 'source_filenames': (
'less/main.less', 'less/main.less',
@ -131,17 +131,26 @@ PIPELINE_CSS = {
), ),
'output_filename': 'css/main.css', 'output_filename': 'css/main.css',
} }
}
} }
SITE_ID = 1 PIPELINE['COMPILERS'] = (
'pipeline.compilers.less.LessCompiler',
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_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 = ( MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.cache.UpdateCacheMiddleware',
@ -165,6 +174,13 @@ MIDDLEWARE_CLASSES = (
'pipeline.middleware.MinifyHTMLMiddleware', '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 = ( TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth', 'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages', 'django.contrib.messages.context_processors.messages',
@ -178,7 +194,6 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.static', 'django.core.context_processors.static',
'cms.context_processors.cms_settings', 'cms.context_processors.cms_settings',
'aldryn_boilerplates.context_processors.boilerplate', 'aldryn_boilerplates.context_processors.boilerplate',
) )
CACHES = { CACHES = {

Loading…
Cancel
Save