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__)))
13 # ('Your Name', 'your_email@domain.com'),
16 DEFAULT_FROM_EMAIL = 'radio@esperanzah.be'
17 ALLOWED_HOSTS = ['radio-2017.esperanzah.be', 'radio.esperanzah.be']
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.
87 # List of finder classes that know how to find static files in
89 STATICFILES_FINDERS = (
90 'django.contrib.staticfiles.finders.FileSystemFinder',
91 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
92 'compressor.finders.CompressorFinder',
93 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
96 # Make this unique, and don't share it with anybody.
97 SECRET_KEY = '3qm&@6264-=st16)7_xa*ds+31e0mqqs@+*!ud7gzt$tq!b^qn'
99 MIDDLEWARE_CLASSES = (
100 'django.middleware.cache.UpdateCacheMiddleware',
101 #'django.middleware.gzip.GZipMiddleware',
102 'django.contrib.sessions.middleware.SessionMiddleware',
103 'django.middleware.locale.LocaleMiddleware',
104 'django.middleware.common.CommonMiddleware',
105 'django.middleware.csrf.CsrfViewMiddleware',
106 'django.contrib.auth.middleware.AuthenticationMiddleware',
107 'django.contrib.messages.middleware.MessageMiddleware',
108 #'request.middleware.RequestMiddleware',
109 'panikweb.middleware.StripPiwikCookieMiddleware',
110 'django.middleware.cache.FetchFromCacheMiddleware',
115 'BACKEND': 'django.template.backends.django.DjangoTemplates',
117 os.path.join(PROJECT_DIR, 'panikweb_templates'),
121 'context_processors': [
122 'django.contrib.auth.context_processors.auth',
123 'django.template.context_processors.debug',
124 'django.template.context_processors.i18n',
125 'django.template.context_processors.media',
126 'django.template.context_processors.request',
127 'django.template.context_processors.static',
128 'django.template.context_processors.tz',
129 'panikweb.context_processors.site_url',
136 ROOT_URLCONF = 'panikweb.urls'
139 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
140 # Always use forward slashes, even on Windows.
141 # Don't forget to use absolute paths, not relative paths.
145 'django.contrib.auth',
146 'django.contrib.contenttypes',
147 'django.contrib.sessions',
148 'django.contrib.sites',
149 'django.contrib.messages',
150 'django.contrib.staticfiles',
151 'django.contrib.admin',
152 'django.contrib.admindocs',
155 'panikweb_templates',
156 'panikweb.paniktags',
169 'combo.apps.dashboard',
174 CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads')
175 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
177 HAYSTACK_CONNECTIONS = {
179 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
180 'URL': 'http://127.0.0.1:8985/solr/panik'
184 FIBER_TEMPLATE_CHOICES = (
185 ('tpl-default.html', 'Default template'),
192 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
198 'disable_existing_loggers': False,
200 'require_debug_false': {
201 '()': '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 DEBUG_TOOLBAR_PANELS = (
225 'debug_toolbar.panels.version.VersionDebugPanel',
226 'debug_toolbar.panels.timer.TimerDebugPanel',
227 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
228 'debug_toolbar.panels.headers.HeaderDebugPanel',
229 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
230 'debug_toolbar.panels.sql.SQLDebugPanel',
231 'debug_toolbar.panels.template.TemplateDebugPanel',
232 'debug_toolbar.panels.signals.SignalDebugPanel',
233 'debug_toolbar.panels.logger.LoggingPanel',
236 from panikombo.misc import COMBO_PUBLIC_TEMPLATES
238 LANGUAGE_COOKIE_NAME = 'panikweb_language'
242 COMBO_DASHBOARD_ENABLED = False
245 WEBSITE_BASE_URL = 'http://www.radiopanik.org/'
248 from local_settings import *
249 except ImportError, e:
252 if DEBUG and DEBUG_TOOLBAR:
253 MIDDLEWARE_CLASSES += (
254 'debug_toolbar.middleware.DebugToolbarMiddleware',
260 if 'template_timings_panel.panels.TemplateTimings.TemplateTimings' in DEBUG_TOOLBAR_PANELS:
261 INSTALLED_APPS += ('template_timings_panel',)
263 if ENABLE_PIWIK is False:
264 MIDDLEWARE_CLASSES = tuple([x for x in MIDDLEWARE_CLASSES \
265 if x != 'panikweb.middleware.StripPiwikCookieMiddleware'])
267 if STATSD_CLIENT != 'django_statsd.clients.null':
268 MIDDLEWARE_CLASSES = (
269 'django_statsd.middleware.GraphiteRequestTimingMiddleware',
270 'django_statsd.middleware.GraphiteMiddleware',
271 ) + MIDDLEWARE_CLASSES
278 'raven.contrib.django.raven_compat',
281 AUTH_USER_MODEL = 'aa.User'
282 INSTALLED_APPS += ('panikdb.aa',)
284 COMBO_DASHBOARD_ENABLED = False