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 = 'info@radiopanik.org'
18 LOGIN_REDIRECT_URL = '/'
22 'ENGINE': 'django.db.backends.sqlite3',
23 'NAME': os.path.join(PROJECT_DIR, 'panikweb.sqlite3'),
31 ACCOUNT_ACTIVATION_DAYS = 7 # Activation window
33 #if django.VERSION[:2] < (1, 6):
34 TEST_RUNNER = 'discover_runner.DiscoverRunner'
36 # Local time zone for this installation. Choices can be found here:
37 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
38 # although not all choices may be available on all operating systems.
39 # If running in a Windows environment this must be set to the same as your
41 TIME_ZONE = 'Europe/Brussels'
43 # Language code for this installation. All choices can be found here:
44 # http://www.i18nguy.com/unicode/language-identifiers.html
45 LANGUAGE_CODE = 'fr-be'
54 # If you set this to False, Django will make some optimizations so as not
55 # to load the internationalization machinery.
58 LOCALE_PATHS = (os.path.join(PROJECT_DIR, 'panikweb', 'locale'),)
60 # Absolute filesystem path to the directory that will hold user-uploaded files.
61 # Example: "/home/media/media.lawrence.com/media/"
62 MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
64 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
66 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
69 # Absolute path to the directory static files should be collected to.
70 # Don't put anything in this directory yourself; store your static files
71 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
72 # Example: "/home/media/media.lawrence.com/static/"
73 STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticroot')
75 # URL prefix for static files.
76 # Example: "http://media.lawrence.com/static/"
77 STATIC_URL = '/static/'
79 # Additional locations of static files
81 # Put strings here, like "/home/html/static" or "C:/www/django/static".
82 # Always use forward slashes, even on Windows.
83 # Don't forget to use absolute paths, not relative paths.
86 # List of finder classes that know how to find static files in
88 STATICFILES_FINDERS = (
89 'django.contrib.staticfiles.finders.FileSystemFinder',
90 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
91 'gadjo.finders.XStaticFinder',
92 # '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.panikweb',
132 'combo.public.templatetags.combo',
139 ROOT_URLCONF = 'panikweb.urls'
142 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
143 # Always use forward slashes, even on Windows.
144 # Don't forget to use absolute paths, not relative paths.
148 'django.contrib.auth',
149 'django.contrib.contenttypes',
150 'django.contrib.sessions',
151 'django.contrib.sites',
152 'django.contrib.messages',
153 'django.contrib.staticfiles',
154 'django.contrib.admin',
155 'django.contrib.admindocs',
159 'panikweb_templates',
160 'panikweb.paniktags',
170 'combo.apps.dashboard',
175 CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads')
176 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
178 HAYSTACK_CONNECTIONS = {
180 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
181 'URL': 'http://127.0.0.1:8985/solr/panik'
185 FIBER_TEMPLATE_CHOICES = (
186 ('tpl-default.html', 'Default template'),
193 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
199 'disable_existing_loggers': False,
201 'require_debug_false': {
202 '()': 'django.utils.log.RequireDebugFalse'
208 'filters': ['require_debug_false'],
209 'class': 'django.utils.log.AdminEmailHandler'
214 'handlers': ['mail_admins'],
221 STATSD_CLIENT = 'django_statsd.clients.null'
225 DEBUG_TOOLBAR_PANELS = (
226 'debug_toolbar.panels.version.VersionDebugPanel',
227 'debug_toolbar.panels.timer.TimerDebugPanel',
228 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
229 'debug_toolbar.panels.headers.HeaderDebugPanel',
230 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
231 'debug_toolbar.panels.sql.SQLDebugPanel',
232 'debug_toolbar.panels.template.TemplateDebugPanel',
233 'debug_toolbar.panels.signals.SignalDebugPanel',
234 'debug_toolbar.panels.logger.LoggingPanel',
237 from panikombo.misc import COMBO_PUBLIC_TEMPLATES
239 LANGUAGE_COOKIE_NAME = 'panikweb_language'
243 COMBO_DASHBOARD_ENABLED = False
244 COMBO_MAP_TILE_URLTEMPLATE = ''
245 COMBO_MAP_ATTRIBUTION = ''
247 COMBO_CELL_ASSET_SLOTS = {}
249 RADIO_NAME = 'Radio Panik'
250 RADIO_LONG_NAME = 'Radio Panik - 105.4 FM'
251 WEBSITE_BASE_URL = 'http://www.radiopanik.org/'
253 COMBO_INITIAL_LOGIN_PAGE_PATH = '/'
254 COMBO_WELCOME_PAGE_PATH = None
256 local_settings_file = os.environ.get(
257 'PANIKWEB_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')
259 if os.path.exists(local_settings_file):
260 exec(open(local_settings_file).read())
262 if DEBUG and DEBUG_TOOLBAR:
263 MIDDLEWARE_CLASSES += (
264 'debug_toolbar.middleware.DebugToolbarMiddleware',
270 if 'template_timings_panel.panels.TemplateTimings.TemplateTimings' in DEBUG_TOOLBAR_PANELS:
271 INSTALLED_APPS += ('template_timings_panel',)
273 if ENABLE_PIWIK is False:
274 MIDDLEWARE_CLASSES = tuple([x for x in MIDDLEWARE_CLASSES \
275 if x != 'panikweb.middleware.StripPiwikCookieMiddleware'])
277 if STATSD_CLIENT != 'django_statsd.clients.null':
278 MIDDLEWARE_CLASSES = (
279 'django_statsd.middleware.GraphiteRequestTimingMiddleware',
280 'django_statsd.middleware.GraphiteMiddleware',
281 ) + MIDDLEWARE_CLASSES
288 'raven.contrib.django.raven_compat',