X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5fa827a3cd9dcbfb587074f6046a66cbe1d5f5e4..0fd55a38c4873d5916a3553d7510b9308f4eee6d:/platforma/settings.py diff --git a/platforma/settings.py b/platforma/settings.py index 5d0479a8..0fb6518d 100644 --- a/platforma/settings.py +++ b/platforma/settings.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from os import path +import os.path -PROJECT_ROOT = path.realpath(path.dirname(__file__)) +PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__)) DEBUG = False TEMPLATE_DEBUG = DEBUG @@ -84,8 +84,9 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django_cas.middleware.CASMiddleware', - 'django.middleware.doc.XViewMiddleware', + 'django.middleware.doc.XViewMiddleware', 'maintenancemode.middleware.MaintenanceModeMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware' ) AUTHENTICATION_BACKENDS = ( @@ -127,10 +128,10 @@ COMPRESS_CSS = { } COMPRESS_JS = { - # everything except codemirror + # everything except codemirror and jquery (which we take from google) 'detail': { 'source_filenames': ( - 'js/jquery-1.4.2.min.js', + #'js/jquery-1.4.2.min.js', 'js/jquery.autocomplete.js', 'js/jquery.blockui.js', 'js/jquery.elastic.js', @@ -143,13 +144,14 @@ COMPRESS_JS = { }, 'listing': { 'source_filenames': ( - 'js/jquery-1.4.2.min.js', + # 'js/jquery-1.4.2.min.js', 'js/slugify.js', ), 'output_filename': 'compressed/listing_scripts_?.js', } } +COMPRESS = True COMPRESS_CSS_FILTERS = None COMPRESS_JS_FILTERS = None COMPRESS_AUTO = False @@ -166,11 +168,14 @@ INSTALLED_APPS = ( 'django.contrib.admindocs', 'django_nose', + 'debug_toolbar', + 'compress', - - 'wiki', + 'south', 'sorl.thumbnail', 'filebrowser', + + 'wiki', 'toolbar', ) @@ -216,3 +221,19 @@ try: except ImportError: pass +try: + LOGGING_CONFIG_FILE +except NameError: + LOGGING_CONFIG_FILE = os.path.join(PROJECT_ROOT, + ('logging.cfg' if not DEBUG else 'logging.cfg.dev')) + +try: + import logging + import logging.config + + logging.config.fileConfig(LOGGING_CONFIG_FILE) +except ImportError, exc: + import traceback + traceback.print_exc() + raise +