]> git.0d.be Git - panikdb.git/blobdiff - panikdb/settings.py
settings: add flag to enable/disable soma support
[panikdb.git] / panikdb / settings.py
index c9ed79ede1b0e92061ad4904dfaa841cbc91c87a..7733e43033820eda99b92830f9b42ebd713e35f1 100644 (file)
@@ -1,13 +1,14 @@
 # Django settings for panikdb project.
 # coding: utf-8
 
+import copy
 import os
 from django.conf import global_settings
 
 DEBUG = True
-TEMPLATE_DEBUG = DEBUG
 DEBUG_TOOLBAR = True
 
+PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
 PROJECT_PATH = os.path.dirname(os.path.dirname(__file__))
 
 ADMINS = (
@@ -43,6 +44,8 @@ SITE_ID = 1
 # to load the internationalization machinery.
 USE_I18N = True
 
+LOCALE_PATHS = (os.path.join(PROJECT_DIR, 'panikdb', 'locale'),)
+
 # If you set this to False, Django will not format dates, numbers and
 # calendars according to the current locale.
 USE_L10N = True
@@ -69,6 +72,8 @@ STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
 # Example: "http://example.com/static/", "http://static.example.com/"
 STATIC_URL = '/static/'
 
+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
+
 CKEDITOR_UPLOAD_PATH = 'uploads/'
 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
 
@@ -82,18 +87,37 @@ STATICFILES_DIRS = (
 
 # List of finder classes that know how to find static files in
 # various locations.
-STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + \
-            ('gadjo.finders.XStaticFinder',)
+STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + \
+            ['gadjo.finders.XStaticFinder']
 
 # Make this unique, and don't share it with anybody.
 SECRET_KEY = '(jwx-1y#d#vps93glikirr&tq_!^_4g+9-qj(jy#l=sllqw(^j'
 
-# List of callables that know how to import templates from various sources.
-TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.Loader',
-    'django.template.loaders.app_directories.Loader',
-#     'django.template.loaders.eggs.Loader',
-)
+TEMPLATES = [
+    {
+        'BACKEND': 'django.template.backends.django.DjangoTemplates',
+        'DIRS': [
+            os.path.join(PROJECT_PATH, 'panikdb', 'templates'),
+        ],
+        'APP_DIRS': True,
+        'OPTIONS': {
+            'context_processors': [
+                'django.template.context_processors.request',
+                'django.contrib.auth.context_processors.auth',
+                'django.template.context_processors.debug',
+                'django.template.context_processors.i18n',
+                'django.template.context_processors.media',
+                'django.template.context_processors.static',
+                'django.template.context_processors.tz',
+                'django.contrib.messages.context_processors.messages',
+                'panikdb.context_processors.internal_ip',
+                'panikdb.context_processors.site_settings',
+            ],
+        },
+    },
+]
+
+
 
 MIDDLEWARE_CLASSES = (
     'django.middleware.common.CommonMiddleware',
@@ -110,10 +134,6 @@ ROOT_URLCONF = 'panikdb.urls'
 # Python dotted path to the WSGI application used by Django's runserver.
 WSGI_APPLICATION = 'panikdb.wsgi.application'
 
-TEMPLATE_DIRS = (
-    os.path.join(PROJECT_PATH, 'panikdb', 'templates'),
-)
-
 INSTALLED_APPS = (
     'django.contrib.auth',
     'django.contrib.contenttypes',
@@ -126,9 +146,6 @@ INSTALLED_APPS = (
     'ckeditor',
     'haystack',
     'taggit',
-    'jquery',
-    'datetimewidget',
-    'django_bootstrap_staticfiles',
     'emissions',
     'newsletter',
     'matos',
@@ -140,11 +157,15 @@ INSTALLED_APPS = (
     'gadjo',
     'combo.data',
     'combo.manager',
+    'combo.apps.assets',
+    'combo.apps.gallery',
     'combo.apps.maps',
+    'combo.apps.notifications',
+    'combo.apps.pwa',
     'sorl.thumbnail',
-    'gallery',
     'panikombo',
     'django_select2',
+    'xstatic.pkg.select2',
 )
 
 # A sample logging configuration. The only tangible logging
@@ -191,6 +212,9 @@ CKEDITOR_CONFIGS = {
     },
 }
 
+CKEDITOR_CONFIGS['small'] = copy.copy(CKEDITOR_CONFIGS['default'])
+CKEDITOR_CONFIGS['small']['height'] = 150
+
 HAYSTACK_CONNECTIONS = {
     'default': {
         'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
@@ -233,15 +257,17 @@ AUTO_RENDER_SELECT2_STATICS = False
 PIGE_DOWNLOAD_BASE_URL = 'http://pige.panik/extractor/download.cgi'
 
 JSON_CELL_TYPES = {}
-
-TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + \
-            ('panikdb.context_processors.internal_ip',)
+TEMPLATE_VARS = {}
 
 FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755
 FILE_UPLOAD_PERMISSIONS = 0o644
 
+ENABLE_TOPIKS = True
+HAS_SOMA = False
+SITE_TITLE = 'PanikDB'
+
 try:
-    from local_settings import *
+    from .local_settings import *
 except ImportError:
     pass