From 0c8f0ff3f3b4f2f6f5a4e4b18bc7d2d347a89c05 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 16 Feb 2017 16:20:17 +0100 Subject: [PATCH] update localsettings + some cleanup --- manage.py | 2 +- redakcja/localsettings.sample | 30 ++++++++++++++++++++++-------- redakcja/settings/common.py | 2 +- redakcja/wsgi.py | 2 +- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/manage.py b/manage.py index dea56f55..29702c0e 100755 --- a/manage.py +++ b/manage.py @@ -10,7 +10,7 @@ sys.path = [ ] + sys.path if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "redakcja.localsettings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "redakcja.settings") from django.core.management import execute_from_command_line diff --git a/redakcja/localsettings.sample b/redakcja/localsettings.sample index d825589b..f513c8ad 100644 --- a/redakcja/localsettings.sample +++ b/redakcja/localsettings.sample @@ -1,4 +1,5 @@ -# +# -*- coding: utf-8 -*- +# # localsettings template for Platforma # # Duplicate this file as localsettings.py and change it to your liking. @@ -8,16 +9,23 @@ # or localsettings.sample instead. # -# THIS IS REQUIRED -from redakcja.settings import * +import os.path + +from redakcja.settings.common import PROJECT_ROOT +from redakcja.settings.compress import PIPELINE # Path to repository with managed documents CATALOGUE_REPO_PATH = '/srv/redakcja/books' LOGGING_CONFIG_FILE = "/srv/redakcja/logging.cfg.dev" -STATIC_ROOT = '/srv/redakcja/static/' -MEDIA_ROOT = '/srv/redakcja/media/' +BASE_DIR = os.path.dirname(PROJECT_ROOT) + +STATIC_ROOT = os.path.join(BASE_DIR, 'var', 'static') +MEDIA_ROOT = os.path.join(BASE_DIR, 'var', 'media') +STATIC_URL = '/static/' +MEDIA_URL = '/media/' + # Subdirectory of MEDIA_ROOT containing images IMAGE_DIR = 'images/' @@ -26,13 +34,19 @@ CAS_SERVER_URL = 'http://logowanie.nowoczesnapolska.org.pl/cas/' CAS_VERSION = '1' REDMINE_URL = 'http://redmine.nowoczesnapolska.org.pl/' + + DEBUG = True MAINTENANCE_MODE = False -COMPRESS = False + +PIPELINE['PIPELINE_ENABLED'] = False APICLIENT_WL_CONSUMER_KEY = None APICLIENT_WL_CONSUMER_SECRET = None -CELERY_ALWAYS_EAGER = False +CELERY_ALWAYS_EAGER = True + +SECRET_KEY = 'very secret' +ALLOWED_HOSTS = ['*'] -SECRET_KEY = '' +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' diff --git a/redakcja/settings/common.py b/redakcja/settings/common.py index 52752cd9..cad0951c 100644 --- a/redakcja/settings/common.py +++ b/redakcja/settings/common.py @@ -9,7 +9,7 @@ DEBUG = False MAINTENANCE_MODE = False ADMINS = ( - (u'Radek Czajka', 'radoslaw.czajka@nowoczesnapolska.org.pl'), + (u'Jan Szejko', 'jan.szejko@nowoczesnapolska.org.pl'), ) MANAGERS = ADMINS diff --git a/redakcja/wsgi.py b/redakcja/wsgi.py index 10f09018..b00ec5cc 100755 --- a/redakcja/wsgi.py +++ b/redakcja/wsgi.py @@ -17,7 +17,7 @@ sys.path = [ ] + sys.path -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "redakcja.localsettings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "redakcja.settings") # This application object is used by the development server # as well as any WSGI server configured to use this file. -- 2.20.1