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',
173 'combo.apps.notifications',
177 'xstatic.pkg.leaflet',
178 'xstatic.pkg.leaflet_markercluster',
179 'xstatic.pkg.leaflet_gesturehandling',
182 CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads')
183 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
185 HAYSTACK_CONNECTIONS = {
187 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
188 'URL': 'http://127.0.0.1:8985/solr/panik',
192 FIBER_TEMPLATE_CHOICES = (('tpl-default.html', 'Default template'),)
198 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
204 'disable_existing_loggers': False,
205 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}},
209 'filters': ['require_debug_false'],
210 'class': 'django.utils.log.AdminEmailHandler',
215 'handlers': ['mail_admins'],
222 STATSD_CLIENT = 'django_statsd.clients.null'
226 ACCESS_LOG_FILENAME = '/var/log/nginx/panikweb-access.log'
228 from panikombo.misc import COMBO_PUBLIC_TEMPLATES
230 LANGUAGE_COOKIE_NAME = 'panikweb_language'
233 'pwa_display': 'standalone',
234 'theme_color': "#000000",
237 COMBO_DASHBOARD_ENABLED = False
238 COMBO_MAP_TILE_URLTEMPLATE = ''
239 COMBO_MAP_ATTRIBUTION = ''
241 COMBO_CELL_ASSET_SLOTS = {}
243 RADIO_NAME = 'Radio Panik'
244 RADIO_LONG_NAME = 'Radio Panik - 105.4 FM'
245 RADIO_META_DESCRIPTION = None
246 WEBSITE_BASE_URL = 'https://www.radiopanik.org/'
247 PODCASTS_DEFAULT_IMAGE_PATH = '/static/img/logo-panik-500.png'
248 RADIO_STREAM_URLS = [
251 'm3u_url': 'https://streaming.domainepublic.net/radiopanik.ogg.m3u',
252 'url': 'https://streaming.domainepublic.net/radiopanik.ogg',
257 'm3u_url': 'https://streaming.domainepublic.net/radiopanik.mp3.m3u',
258 'url': 'https://streaming.domainepublic.net/radiopanik.mp3',
259 'type': 'audio/mpeg',
263 HOME_EMISSIONS_COUNT = 3
265 HOME_NEWSITEMS_COUNT = 3
266 HOME_PODCASTS_COUNT = 3
267 USE_AGENDA_ONLY_FIELD = False
269 PROGRAM_PREFIX = 'programme/'
270 EMISSIONS_PREFIX = 'emissions/'
271 NEWSITEMS_PREFIX = 'actus/'
273 THUMBNAIL_BACKEND = 'panikweb.utils.ThumbnailBackend'
275 COMBO_INITIAL_LOGIN_PAGE_PATH = '/'
276 COMBO_WELCOME_PAGE_PATH = None
277 COMBO_CELL_TEMPLATES = {}
278 CELL_CONDITIONS_ENABLED = False
280 local_settings_file = os.environ.get(
281 'PANIKWEB_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')
283 if os.path.exists(local_settings_file):
284 exec(open(local_settings_file).read())
286 if DEBUG and DEBUG_TOOLBAR:
287 MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
288 INSTALLED_APPS += ('debug_toolbar',)
290 if ENABLE_PIWIK is False:
291 MIDDLEWARE = tuple(x for x in MIDDLEWARE if x != 'panikweb.middleware.StripPiwikCookieMiddleware')
293 if STATSD_CLIENT != 'django_statsd.clients.null':
295 'django_statsd.middleware.GraphiteRequestTimingMiddleware',
296 'django_statsd.middleware.GraphiteMiddleware',
298 INSTALLED_APPS += ('django_statsd',)
301 INSTALLED_APPS += ('raven.contrib.django.raven_compat',)