1 # Django settings for panikdb project.
6 from django.conf import global_settings
11 PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
12 PROJECT_PATH = os.path.dirname(os.path.dirname(__file__))
15 ('Frederic Peters', 'fred@radiopanik.org'),
22 'ENGINE': 'django.db.backends.sqlite3',
23 'NAME': os.path.join(PROJECT_PATH, 'panikdb.sqlite3'),
27 # Hosts/domain names that are valid for this site; required if DEBUG is False
28 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
31 # Local time zone for this installation. Choices can be found here:
32 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
33 # although not all choices may be available on all operating systems.
34 # In a Windows environment this must be set to your system time zone.
35 TIME_ZONE = 'Europe/Brussels'
37 # Language code for this installation. All choices can be found here:
38 # http://www.i18nguy.com/unicode/language-identifiers.html
39 LANGUAGE_CODE = 'fr-be'
43 # If you set this to False, Django will make some optimizations so as not
44 # to load the internationalization machinery.
47 LOCALE_PATHS = (os.path.join(PROJECT_DIR, 'panikdb', 'locale'),)
49 # If you set this to False, Django will not format dates, numbers and
50 # calendars according to the current locale.
53 # If you set this to False, Django will not use timezone-aware datetimes.
56 # Absolute filesystem path to the directory that will hold user-uploaded files.
57 # Example: "/var/www/example.com/media/"
58 MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
60 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
62 # Examples: "http://example.com/media/", "http://media.example.com/"
65 # Absolute path to the directory static files should be collected to.
66 # Don't put anything in this directory yourself; store your static files
67 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
68 # Example: "/var/www/example.com/static/"
69 STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
71 # URL prefix for static files.
72 # Example: "http://example.com/static/", "http://static.example.com/"
73 STATIC_URL = '/static/'
75 SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
77 CKEDITOR_UPLOAD_PATH = 'uploads/'
78 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
80 # Additional locations of static files
82 # Put strings here, like "/home/html/static" or "C:/www/django/static".
83 # Always use forward slashes, even on Windows.
84 # Don't forget to use absolute paths, not relative paths.
85 os.path.join(PROJECT_PATH, 'panikdb', 'static'),
88 # List of finder classes that know how to find static files in
90 STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + \
91 ['gadjo.finders.XStaticFinder']
93 # Make this unique, and don't share it with anybody.
94 SECRET_KEY = '(jwx-1y#d#vps93glikirr&tq_!^_4g+9-qj(jy#l=sllqw(^j'
98 'BACKEND': 'django.template.backends.django.DjangoTemplates',
100 os.path.join(PROJECT_PATH, 'panikdb', 'templates'),
104 'context_processors': [
105 'django.template.context_processors.request',
106 'django.contrib.auth.context_processors.auth',
107 'django.template.context_processors.debug',
108 'django.template.context_processors.i18n',
109 'django.template.context_processors.media',
110 'django.template.context_processors.static',
111 'django.template.context_processors.tz',
112 'django.contrib.messages.context_processors.messages',
113 'panikdb.context_processors.internal_ip',
114 'panikdb.context_processors.site_settings',
122 MIDDLEWARE_CLASSES = (
123 'django.middleware.common.CommonMiddleware',
124 'django.contrib.sessions.middleware.SessionMiddleware',
125 'django.middleware.csrf.CsrfViewMiddleware',
126 'django.contrib.auth.middleware.AuthenticationMiddleware',
127 'django.contrib.messages.middleware.MessageMiddleware',
128 # Uncomment the next line for simple clickjacking protection:
129 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
132 ROOT_URLCONF = 'panikdb.urls'
134 # Python dotted path to the WSGI application used by Django's runserver.
135 WSGI_APPLICATION = 'panikdb.wsgi.application'
138 'django.contrib.auth',
139 'django.contrib.contenttypes',
140 'django.contrib.sessions',
141 'django.contrib.sites',
142 'django.contrib.messages',
143 'django.contrib.staticfiles',
144 'django.contrib.admin',
154 'panikdb.customtags',
161 'combo.apps.gallery',
163 'combo.apps.notifications',
168 'xstatic.pkg.select2',
171 # A sample logging configuration. The only tangible logging
172 # performed by this configuration is to send an email to
173 # the site admins on every HTTP 500 error when DEBUG=False.
174 # See http://docs.djangoproject.com/en/dev/topics/logging for
175 # more details on how to customize your logging configuration.
178 'disable_existing_loggers': False,
180 'require_debug_false': {
181 '()': 'django.utils.log.RequireDebugFalse'
187 'filters': ['require_debug_false'],
188 'class': 'django.utils.log.AdminEmailHandler'
193 'handlers': ['mail_admins'],
202 'allowedContent': True,
203 'filebrowserUploadUrl': '/ckeditor/upload/',
204 'filebrowserBrowseUrl': '/ckeditor/browse/',
205 'toolbar_Own': [['Source', 'Format', '-', 'Bold', 'Italic'],
206 ['NumberedList','BulletedList'],
207 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
215 CKEDITOR_CONFIGS['small'] = copy.copy(CKEDITOR_CONFIGS['default'])
216 CKEDITOR_CONFIGS['small']['height'] = 150
218 HAYSTACK_CONNECTIONS = {
220 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
221 'URL': 'http://127.0.0.1:8985/solr/panik'
227 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
231 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
233 AUTH_USER_MODEL = 'aa.User'
234 LOGIN_REDIRECT_URL = '/'
235 WEBSITE_BASE_URL = 'http://www.radiopanik.org/'
237 NEWSLETTER_SENDER = 'info@radiopanik.org'
238 NEWSLETTER_DOMAIN = 'radiopanik.org'
239 NEWSLETTER_STYLE = """
240 body { color: #222; text-align: justify; }
241 h2, h3 { font-family: "Reglo"; }
242 h3 { margin-bottom: 0; }
243 h3 + p { margin-top: 0; }
244 p strong { color: black; }
245 h3 strong { text-transform: uppercase; color: blue; }
246 p a { color: black; text-decoration: none; border-bottom: 1px dotted black; }
247 p a:hover { border-bottom: 1px solid black; }
252 from panikombo.misc import COMBO_PUBLIC_TEMPLATES
253 COMBO_DEFAULT_PUBLIC_TEMPLATE = 'standard'
254 COMBO_MAP_TILE_URLTEMPLATE = ''
255 COMBO_MAP_ATTRIBUTION = ''
257 AUTO_RENDER_SELECT2_STATICS = False
259 PIGE_DOWNLOAD_BASE_URL = 'http://pige.panik/extractor/download.cgi'
264 FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755
265 FILE_UPLOAD_PERMISSIONS = 0o644
269 SITE_TITLE = 'PanikDB'
272 from .local_settings import *
276 if DEBUG and DEBUG_TOOLBAR:
277 MIDDLEWARE_CLASSES += (
278 'debug_toolbar.middleware.DebugToolbarMiddleware',
286 'raven.contrib.django.raven_compat',