]> git.0d.be Git - panikdb.git/blobdiff - panikdb/settings.py
settings: define SECURE_PROXY_SSL_HEADER
[panikdb.git] / panikdb / settings.py
index 4992ae6b1b1fb1d4e619c6da6018e4857ca156aa..7f32673eb414967bf10608e84c54a0d18d177633 100644 (file)
@@ -1,6 +1,7 @@
 # Django settings for panikdb project.
 # coding: utf-8
 
+import copy
 import os
 from django.conf import global_settings
 
@@ -71,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/'
 
@@ -99,6 +102,7 @@ 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',
@@ -107,6 +111,7 @@ TEMPLATES = [
                 'django.template.context_processors.tz',
                 'django.contrib.messages.context_processors.messages',
                 'panikdb.context_processors.internal_ip',
+                'panikdb.context_processors.site_settings',
             ],
         },
     },
@@ -153,13 +158,14 @@ INSTALLED_APPS = (
     '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
@@ -206,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',
@@ -248,12 +257,16 @@ AUTO_RENDER_SELECT2_STATICS = False
 PIGE_DOWNLOAD_BASE_URL = 'http://pige.panik/extractor/download.cgi'
 
 JSON_CELL_TYPES = {}
+TEMPLATE_VARS = {}
 
 FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755
 FILE_UPLOAD_PERMISSIONS = 0o644
 
+ENABLE_TOPIKS = True
+SITE_TITLE = 'PanikDB'
+
 try:
-    from local_settings import *
+    from .local_settings import *
 except ImportError:
     pass