5 import django.conf.global_settings as DEFAULT_SETTINGS
7 DEBUG = True # Turn off for production
10 PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
11 PROJECT_PATH = os.path.dirname(os.path.dirname(__file__))
14 # ('Your Name', 'your_email@domain.com'),
17 DEFAULT_FROM_EMAIL = 'info@radiopanik.org'
19 LOGIN_REDIRECT_URL = '/'
23 'ENGINE': 'django.db.backends.sqlite3',
24 'NAME': os.path.join(PROJECT_DIR, 'panikweb.sqlite3'),
32 ACCOUNT_ACTIVATION_DAYS = 7 # Activation window
34 # if django.VERSION[:2] < (1, 6):
35 TEST_RUNNER = 'discover_runner.DiscoverRunner'
37 # Local time zone for this installation. Choices can be found here:
38 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
39 # although not all choices may be available on all operating systems.
40 # If running in a Windows environment this must be set to the same as your
42 TIME_ZONE = 'Europe/Brussels'
44 # Language code for this installation. All choices can be found here:
45 # http://www.i18nguy.com/unicode/language-identifiers.html
46 LANGUAGE_CODE = 'fr-be'
55 # If you set this to False, Django will make some optimizations so as not
56 # to load the internationalization machinery.
59 LOCALE_PATHS = (os.path.join(PROJECT_DIR, 'panikweb', 'locale'),)
61 # Absolute filesystem path to the directory that will hold user-uploaded files.
62 # Example: "/home/media/media.lawrence.com/media/"
63 MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
65 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
67 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
70 # Absolute path to the directory static files should be collected to.
71 # Don't put anything in this directory yourself; store your static files
72 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
73 # Example: "/home/media/media.lawrence.com/static/"
74 STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticroot')
76 # URL prefix for static files.
77 # Example: "http://media.lawrence.com/static/"
78 STATIC_URL = '/static/'
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, 'panikweb', 'static'),
88 # List of finder classes that know how to find static files in
90 STATICFILES_FINDERS = (
91 'django.contrib.staticfiles.finders.FileSystemFinder',
92 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
93 'gadjo.finders.XStaticFinder',
94 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
98 # Make this unique, and don't share it with anybody.
99 SECRET_KEY = '3qm&@6264-=st16)7_xa*ds+31e0mqqs@+*!ud7gzt$tq!b^qn'
102 'django.middleware.cache.UpdateCacheMiddleware',
103 #'django.middleware.gzip.GZipMiddleware',
104 'django.contrib.sessions.middleware.SessionMiddleware',
105 'django.middleware.locale.LocaleMiddleware',
106 'django.middleware.common.CommonMiddleware',
107 'django.middleware.csrf.CsrfViewMiddleware',
108 'django.contrib.auth.middleware.AuthenticationMiddleware',
109 'django.contrib.messages.middleware.MessageMiddleware',
110 #'request.middleware.RequestMiddleware',
111 'panikweb.middleware.StripPiwikCookieMiddleware',
112 'django.middleware.cache.FetchFromCacheMiddleware',
117 'BACKEND': 'django.template.backends.django.DjangoTemplates',
119 os.path.join(PROJECT_DIR, 'panikweb', 'templates'),
123 'context_processors': [
124 'django.contrib.auth.context_processors.auth',
125 'django.template.context_processors.debug',
126 'django.template.context_processors.i18n',
127 'django.template.context_processors.media',
128 'django.template.context_processors.request',
129 'django.template.context_processors.static',
130 'django.template.context_processors.tz',
131 'panikweb.context_processors.panikweb',
134 'combo.public.templatetags.combo',
141 ROOT_URLCONF = 'panikweb.urls'
144 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
145 # Always use forward slashes, even on Windows.
146 # Don't forget to use absolute paths, not relative paths.
150 'django.contrib.auth',
151 'django.contrib.contenttypes',
152 'django.contrib.sessions',
153 'django.contrib.sites',
154 'django.contrib.messages',
155 'django.contrib.staticfiles',
159 'panikweb.paniktags',
170 'combo.apps.dashboard',
171 'combo.apps.gallery',
175 'xstatic.pkg.leaflet',
176 'xstatic.pkg.leaflet_markercluster',
177 'xstatic.pkg.leaflet_gesturehandling',
180 CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads')
181 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
183 HAYSTACK_CONNECTIONS = {
185 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
186 'URL': 'http://127.0.0.1:8985/solr/panik',
190 FIBER_TEMPLATE_CHOICES = (('tpl-default.html', 'Default template'),)
196 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
202 'disable_existing_loggers': False,
203 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}},
207 'filters': ['require_debug_false'],
208 'class': 'django.utils.log.AdminEmailHandler',
213 'handlers': ['mail_admins'],
220 STATSD_CLIENT = 'django_statsd.clients.null'
224 ACCESS_LOG_FILENAME = '/var/log/nginx/panikweb-access.log'
226 DEBUG_TOOLBAR_PANELS = (
227 'debug_toolbar.panels.version.VersionDebugPanel',
228 'debug_toolbar.panels.timer.TimerDebugPanel',
229 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
230 'debug_toolbar.panels.headers.HeaderDebugPanel',
231 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
232 'debug_toolbar.panels.sql.SQLDebugPanel',
233 'debug_toolbar.panels.template.TemplateDebugPanel',
234 'debug_toolbar.panels.signals.SignalDebugPanel',
235 'debug_toolbar.panels.logger.LoggingPanel',
238 from panikombo.misc import COMBO_PUBLIC_TEMPLATES
240 LANGUAGE_COOKIE_NAME = 'panikweb_language'
244 COMBO_DASHBOARD_ENABLED = False
245 COMBO_MAP_TILE_URLTEMPLATE = ''
246 COMBO_MAP_ATTRIBUTION = ''
248 COMBO_CELL_ASSET_SLOTS = {}
250 RADIO_NAME = 'Radio Panik'
251 RADIO_LONG_NAME = 'Radio Panik - 105.4 FM'
252 WEBSITE_BASE_URL = 'https://www.radiopanik.org/'
253 PODCASTS_DEFAULT_IMAGE_PATH = '/static/img/logo-panik-500.png'
254 RADIO_STREAM_URLS = [
257 'm3u_url': 'https://streaming.domainepublic.net/radiopanik.ogg.m3u',
258 'url': 'https://streaming.domainepublic.net/radiopanik.ogg',
263 'm3u_url': 'https://streaming.domainepublic.net/radiopanik.mp3.m3u',
264 'url': 'https://streaming.domainepublic.net/radiopanik.mp3',
265 'type': 'audio/mpeg',
269 HOME_EMISSIONS_COUNT = 3
271 HOME_NEWSITEMS_COUNT = 3
272 HOME_PODCASTS_COUNT = 3
273 USE_AGENDA_ONLY_FIELD = False
275 PROGRAM_PREFIX = 'programme/'
276 EMISSIONS_PREFIX = 'emissions/'
277 NEWSITEMS_PREFIX = 'actus/'
280 COMBO_INITIAL_LOGIN_PAGE_PATH = '/'
281 COMBO_WELCOME_PAGE_PATH = None
282 COMBO_CELL_TEMPLATES = {}
284 local_settings_file = os.environ.get(
285 'PANIKWEB_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')
287 if os.path.exists(local_settings_file):
288 exec(open(local_settings_file).read())
290 if DEBUG and DEBUG_TOOLBAR:
291 MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
292 INSTALLED_APPS += ('debug_toolbar',)
294 if 'template_timings_panel.panels.TemplateTimings.TemplateTimings' in DEBUG_TOOLBAR_PANELS:
295 INSTALLED_APPS += ('template_timings_panel',)
297 if ENABLE_PIWIK is False:
298 MIDDLEWARE = tuple(x for x in MIDDLEWARE if x != 'panikweb.middleware.StripPiwikCookieMiddleware')
300 if STATSD_CLIENT != 'django_statsd.clients.null':
302 'django_statsd.middleware.GraphiteRequestTimingMiddleware',
303 'django_statsd.middleware.GraphiteMiddleware',
305 INSTALLED_APPS += ('django_statsd',)
308 INSTALLED_APPS += ('raven.contrib.django.raven_compat',)