настроил collectstatic

remotes/origin/HEAD
Slava Kyrachevsky 9 years ago
parent 04e94aafa5
commit 7c7d7db897
  1. 8
      proj/settings.py
  2. 4
      support/nginx.conf

@ -85,10 +85,7 @@ USE_L10N = False
USE_TZ = False USE_TZ = False
MEDIA_ROOT = os.path.join(SITE_ROOT, 'media/')
CKEDITOR_UPLOAD_PATH = os.path.join(SITE_ROOT, 'media/upload') CKEDITOR_UPLOAD_PATH = os.path.join(SITE_ROOT, 'media/upload')
CKEDITOR_CONFIGS = { CKEDITOR_CONFIGS = {
'default': { 'default': {
'toolbar': 'standart', 'toolbar': 'standart',
@ -114,13 +111,13 @@ CKEDITOR_CONFIGS = {
} }
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(SITE_ROOT, 'media/')
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(SITE_ROOT, 'collected_static') STATIC_ROOT = os.path.join(SITE_ROOT, 'collected_static')
STATICFILES_DIRS = ( STATICFILES_DIRS = (
(os.path.join(SITE_ROOT, 'static')), os.path.join(SITE_ROOT, 'static'),
) )
STATICFILES_FINDERS = ( STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
@ -471,7 +468,6 @@ DEFAULT_PAGINATOR = Paginator
ADMIN_PAGINATION = 20 ADMIN_PAGINATION = 20
CLIENT_PAGINATION = 25 CLIENT_PAGINATION = 25
TEMPLATE_DEBUG = DEBUG
NO_LOGO = '/static/client/img/no-logo.png' NO_LOGO = '/static/client/img/no-logo.png'
# events settings # events settings

@ -49,7 +49,7 @@ server {
location /static { location /static {
access_log off; access_log off;
expires max; expires max;
root /home/www/proj; alias /home/www/proj/collected_static;
} }
location /media { location /media {
@ -61,7 +61,7 @@ server {
location /templates { location /templates {
access_log off; access_log off;
expires max; expires max;
root /home/www/proj/static; alias /home/www/proj/collected_static/templates;
} }
} }

Loading…
Cancel
Save