6 import django.conf.global_settings as DEFAULT_SETTINGS
8 DEBUG = True # Turn off for production
11 PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
12 PROJECT_PATH = os.path.dirname(os.path.dirname(__file__))
15 # ('Your Name', 'your_email@domain.com'),
18 DEFAULT_FROM_EMAIL = 'info@radiopanik.org'
20 LOGIN_REDIRECT_URL = '/'
24 'ENGINE': 'django.db.backends.sqlite3',
25 'NAME': os.path.join(PROJECT_DIR, 'panikweb.sqlite3'),
33 ACCOUNT_ACTIVATION_DAYS = 7 # Activation window
35 #if django.VERSION[:2] < (1, 6):
36 TEST_RUNNER = 'discover_runner.DiscoverRunner'
38 # Local time zone for this installation. Choices can be found here:
39 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
40 # although not all choices may be available on all operating systems.
41 # If running in a Windows environment this must be set to the same as your
43 TIME_ZONE = 'Europe/Brussels'
45 # Language code for this installation. All choices can be found here:
46 # http://www.i18nguy.com/unicode/language-identifiers.html
47 LANGUAGE_CODE = 'fr-be'
56 # If you set this to False, Django will make some optimizations so as not
57 # to load the internationalization machinery.
60 LOCALE_PATHS = (os.path.join(PROJECT_DIR, 'panikweb', 'locale'),)
62 # Absolute filesystem path to the directory that will hold user-uploaded files.
63 # Example: "/home/media/media.lawrence.com/media/"
64 MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
66 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
68 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
71 # Absolute path to the directory static files should be collected to.
72 # Don't put anything in this directory yourself; store your static files
73 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
74 # Example: "/home/media/media.lawrence.com/static/"
75 STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticroot')
77 # URL prefix for static files.
78 # Example: "http://media.lawrence.com/static/"
79 STATIC_URL = '/static/'
81 # Additional locations of static files
83 # Put strings here, like "/home/html/static" or "C:/www/django/static".
84 # Always use forward slashes, even on Windows.
85 # Don't forget to use absolute paths, not relative paths.
86 os.path.join(PROJECT_PATH, 'panikweb', 'static'),
89 # List of finder classes that know how to find static files in
91 STATICFILES_FINDERS = (
92 'django.contrib.staticfiles.finders.FileSystemFinder',
93 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
94 'gadjo.finders.XStaticFinder',
95 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
99 # Make this unique, and don't share it with anybody.
100 SECRET_KEY = '3qm&@6264-=st16)7_xa*ds+31e0mqqs@+*!ud7gzt$tq!b^qn'
102 MIDDLEWARE_CLASSES = (
103 'django.middleware.cache.UpdateCacheMiddleware',
104 #'django.middleware.gzip.GZipMiddleware',
105 'django.contrib.sessions.middleware.SessionMiddleware',
106 'django.middleware.locale.LocaleMiddleware',
107 'django.middleware.common.CommonMiddleware',
108 'django.middleware.csrf.CsrfViewMiddleware',
109 'django.contrib.auth.middleware.AuthenticationMiddleware',
110 'django.contrib.messages.middleware.MessageMiddleware',
111 #'request.middleware.RequestMiddleware',
112 'panikweb.middleware.StripPiwikCookieMiddleware',
113 'django.middleware.cache.FetchFromCacheMiddleware',
118 'BACKEND': 'django.template.backends.django.DjangoTemplates',
120 os.path.join(PROJECT_DIR, 'panikweb', 'templates'),
124 'context_processors': [
125 'django.contrib.auth.context_processors.auth',
126 'django.template.context_processors.debug',
127 'django.template.context_processors.i18n',
128 'django.template.context_processors.media',
129 'django.template.context_processors.request',
130 'django.template.context_processors.static',
131 'django.template.context_processors.tz',
132 'panikweb.context_processors.panikweb',
135 'combo.public.templatetags.combo',
142 ROOT_URLCONF = 'panikweb.urls'
145 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
146 # Always use forward slashes, even on Windows.
147 # Don't forget to use absolute paths, not relative paths.
151 'django.contrib.auth',
152 'django.contrib.contenttypes',
153 'django.contrib.sessions',
154 'django.contrib.sites',
155 'django.contrib.messages',
156 'django.contrib.staticfiles',
157 'django.contrib.admin',
158 'django.contrib.admindocs',
162 'panikweb.paniktags',
172 'combo.apps.dashboard',
173 'combo.apps.gallery',
178 CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads')
179 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
181 HAYSTACK_CONNECTIONS = {
183 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
184 'URL': 'http://127.0.0.1:8985/solr/panik'
188 FIBER_TEMPLATE_CHOICES = (
189 ('tpl-default.html', 'Default template'),
196 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
202 'disable_existing_loggers': False,
204 'require_debug_false': {
205 '()': 'django.utils.log.RequireDebugFalse'
211 'filters': ['require_debug_false'],
212 'class': 'django.utils.log.AdminEmailHandler'
217 'handlers': ['mail_admins'],
224 STATSD_CLIENT = 'django_statsd.clients.null'
228 DEBUG_TOOLBAR_PANELS = (
229 'debug_toolbar.panels.version.VersionDebugPanel',
230 'debug_toolbar.panels.timer.TimerDebugPanel',
231 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
232 'debug_toolbar.panels.headers.HeaderDebugPanel',
233 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
234 'debug_toolbar.panels.sql.SQLDebugPanel',
235 'debug_toolbar.panels.template.TemplateDebugPanel',
236 'debug_toolbar.panels.signals.SignalDebugPanel',
237 'debug_toolbar.panels.logger.LoggingPanel',
240 from panikombo.misc import COMBO_PUBLIC_TEMPLATES
242 LANGUAGE_COOKIE_NAME = 'panikweb_language'
246 COMBO_DASHBOARD_ENABLED = False
247 COMBO_MAP_TILE_URLTEMPLATE = ''
248 COMBO_MAP_ATTRIBUTION = ''
250 COMBO_CELL_ASSET_SLOTS = {}
252 RADIO_NAME = 'Radio Panik'
253 RADIO_LONG_NAME = 'Radio Panik - 105.4 FM'
254 WEBSITE_BASE_URL = 'https://www.radiopanik.org/'
256 COMBO_INITIAL_LOGIN_PAGE_PATH = '/'
257 COMBO_WELCOME_PAGE_PATH = None
259 local_settings_file = os.environ.get(
260 'PANIKWEB_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')
262 if os.path.exists(local_settings_file):
263 exec(open(local_settings_file).read())
265 if DEBUG and DEBUG_TOOLBAR:
266 MIDDLEWARE_CLASSES += (
267 'debug_toolbar.middleware.DebugToolbarMiddleware',
273 if 'template_timings_panel.panels.TemplateTimings.TemplateTimings' in DEBUG_TOOLBAR_PANELS:
274 INSTALLED_APPS += ('template_timings_panel',)
276 if ENABLE_PIWIK is False:
277 MIDDLEWARE_CLASSES = tuple([x for x in MIDDLEWARE_CLASSES \
278 if x != 'panikweb.middleware.StripPiwikCookieMiddleware'])
280 if STATSD_CLIENT != 'django_statsd.clients.null':
281 MIDDLEWARE_CLASSES = (
282 'django_statsd.middleware.GraphiteRequestTimingMiddleware',
283 'django_statsd.middleware.GraphiteMiddleware',
284 ) + MIDDLEWARE_CLASSES
291 'raven.contrib.django.raven_compat',