# 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 = (
# 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
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'
-CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads')
+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
+
+CKEDITOR_UPLOAD_PATH = 'uploads/'
CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
# Additional locations of static files
# List of finder classes that know how to find static files in
# various locations.
-STATICFILES_FINDERS = (
- 'django.contrib.staticfiles.finders.FileSystemFinder',
- 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
-# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
-)
+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',
# 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',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
- 'south',
+ 'registration',
'ckeditor',
'haystack',
'taggit',
- 'jquery',
- 'datetimewidget',
- 'django_bootstrap_staticfiles',
'emissions',
+ 'newsletter',
+ 'matos',
+ 'nonstop',
'panikdb.aa',
+ 'panikdb.customtags',
+ 'panikdb.stats',
+ 'panikdb.poll',
+ 'gadjo',
+ 'combo.data',
+ 'combo.manager',
+ 'combo.apps.assets',
+ 'combo.apps.gallery',
+ 'combo.apps.maps',
+ 'combo.apps.notifications',
+ 'combo.apps.pwa',
+ 'sorl.thumbnail',
+ 'panikombo',
+ 'django_select2',
+ 'xstatic.pkg.select2',
)
# A sample logging configuration. The only tangible logging
CKEDITOR_CONFIGS = {
'default': {
+ 'allowedContent': True,
+ 'filebrowserUploadUrl': '/ckeditor/upload/',
+ 'filebrowserBrowseUrl': '/ckeditor/browse/',
'toolbar_Own': [['Source', 'Format', '-', 'Bold', 'Italic'],
['NumberedList','BulletedList'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Link', 'Unlink'],
- ['Image',]],
+ ['Image',],
+ ['RemoveFormat',]],
'toolbar': 'Own',
},
}
+CKEDITOR_CONFIGS['small'] = copy.copy(CKEDITOR_CONFIGS['default'])
+CKEDITOR_CONFIGS['small']['height'] = 150
+
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
- 'URL': 'http://127.0.0.1:8984/solr/panik'
+ 'URL': 'http://127.0.0.1:8985/solr/panik'
+ },
+}
+
+CACHES = {
+ 'default': {
+ 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
},
}
+TEST_RUNNER = 'django.test.runner.DiscoverRunner'
+
AUTH_USER_MODEL = 'aa.User'
LOGIN_REDIRECT_URL = '/'
+WEBSITE_BASE_URL = 'http://www.radiopanik.org/'
+
+NEWSLETTER_SENDER = 'info@radiopanik.org'
+NEWSLETTER_DOMAIN = 'radiopanik.org'
+NEWSLETTER_STYLE = """
+body { color: #222; text-align: justify; }
+h2, h3 { font-family: "Reglo"; }
+h3 { margin-bottom: 0; }
+h3 + p { margin-top: 0; }
+p strong { color: black; }
+h3 strong { text-transform: uppercase; color: blue; }
+p a { color: black; text-decoration: none; border-bottom: 1px dotted black; }
+p a:hover { border-bottom: 1px solid black; }
+"""
+
+RAVEN_CONFIG = None
+
+from panikombo.misc import COMBO_PUBLIC_TEMPLATES
+COMBO_DEFAULT_PUBLIC_TEMPLATE = 'standard'
+
+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
INSTALLED_APPS += (
'debug_toolbar',
)
- DEBUG_TOOLBAR_CONFIG = {
- 'INTERCEPT_REDIRECTS': False,
- }
+
+if RAVEN_CONFIG:
+ INSTALLED_APPS += (
+ 'raven.contrib.django.raven_compat',
+ )