1 # Django settings for panikdb project.
6 from django.conf import global_settings
11 PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
12 PROJECT_PATH = os.path.dirname(os.path.dirname(__file__))
14 ADMINS = (('Frederic Peters', 'fred@radiopanik.org'),)
20 'ENGINE': 'django.db.backends.sqlite3',
21 'NAME': os.path.join(PROJECT_PATH, 'panikdb.sqlite3'),
25 # Hosts/domain names that are valid for this site; required if DEBUG is False
26 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
29 # Local time zone for this installation. Choices can be found here:
30 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
31 # although not all choices may be available on all operating systems.
32 # In a Windows environment this must be set to your system time zone.
33 TIME_ZONE = 'Europe/Brussels'
35 # Language code for this installation. All choices can be found here:
36 # http://www.i18nguy.com/unicode/language-identifiers.html
37 LANGUAGE_CODE = 'fr-be'
41 # If you set this to False, Django will make some optimizations so as not
42 # to load the internationalization machinery.
45 LOCALE_PATHS = (os.path.join(PROJECT_DIR, 'panikdb', 'locale'),)
47 # If you set this to False, Django will not format dates, numbers and
48 # calendars according to the current locale.
51 # If you set this to False, Django will not use timezone-aware datetimes.
54 # Absolute filesystem path to the directory that will hold user-uploaded files.
55 # Example: "/var/www/example.com/media/"
56 MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
58 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
60 # Examples: "http://example.com/media/", "http://media.example.com/"
63 # Absolute path to the directory static files should be collected to.
64 # Don't put anything in this directory yourself; store your static files
65 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
66 # Example: "/var/www/example.com/static/"
67 STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
69 # URL prefix for static files.
70 # Example: "http://example.com/static/", "http://static.example.com/"
71 STATIC_URL = '/static/'
73 SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
75 CKEDITOR_UPLOAD_PATH = 'uploads/'
76 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
78 # Additional locations of static files
80 # Put strings here, like "/home/html/static" or "C:/www/django/static".
81 # Always use forward slashes, even on Windows.
82 # Don't forget to use absolute paths, not relative paths.
83 os.path.join(PROJECT_PATH, 'panikdb', 'static'),
86 # List of finder classes that know how to find static files in
88 STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + ['gadjo.finders.XStaticFinder']
90 # Make this unique, and don't share it with anybody.
91 SECRET_KEY = '(jwx-1y#d#vps93glikirr&tq_!^_4g+9-qj(jy#l=sllqw(^j'
95 'BACKEND': 'django.template.backends.django.DjangoTemplates',
97 os.path.join(PROJECT_PATH, 'panikdb', 'templates'),
101 'context_processors': [
102 'django.template.context_processors.request',
103 'django.contrib.auth.context_processors.auth',
104 'django.template.context_processors.debug',
105 'django.template.context_processors.i18n',
106 'django.template.context_processors.media',
107 'django.template.context_processors.static',
108 'django.template.context_processors.tz',
109 'django.contrib.messages.context_processors.messages',
110 'panikdb.context_processors.internal_ip',
111 'panikdb.context_processors.site_settings',
114 'combo.public.templatetags.combo',
122 'django.middleware.common.CommonMiddleware',
123 'django.contrib.sessions.middleware.SessionMiddleware',
124 'django.middleware.csrf.CsrfViewMiddleware',
125 'django.contrib.auth.middleware.AuthenticationMiddleware',
126 'django.contrib.messages.middleware.MessageMiddleware',
127 'panikdb.middleware.StoreRequestMiddleware',
128 # Uncomment the next line for simple clickjacking protection:
129 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
132 ROOT_URLCONF = 'panikdb.urls'
134 # Python dotted path to the WSGI application used by Django's runserver.
135 WSGI_APPLICATION = 'panikdb.wsgi.application'
138 'django.contrib.auth',
139 'django.contrib.contenttypes',
140 'django.contrib.sessions',
141 'django.contrib.sites',
142 'django.contrib.messages',
143 'django.contrib.staticfiles',
144 'django.contrib.admin',
156 'panikdb.customtags',
157 'panikdb.service_messages',
168 'combo.apps.dashboard',
169 'combo.apps.gallery',
172 'combo.apps.notifications',
177 'xstatic.pkg.select2',
180 # A sample logging configuration. The only tangible logging
181 # performed by this configuration is to send an email to
182 # the site admins on every HTTP 500 error when DEBUG=False.
183 # See http://docs.djangoproject.com/en/dev/topics/logging for
184 # more details on how to customize your logging configuration.
187 'disable_existing_loggers': False,
188 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}},
192 'filters': ['require_debug_false'],
193 'class': 'django.utils.log.AdminEmailHandler',
198 'handlers': ['mail_admins'],
207 'extraAllowedContent': 'u i b strong em small',
208 'disallowedContent': 'style; script; *[on*]',
209 'filebrowserUploadUrl': '/ckeditor/upload/',
210 'filebrowserBrowseUrl': '/ckeditor/browse/',
212 ['Source', 'Format', '-', 'Bold', 'Italic'],
213 ['NumberedList', 'BulletedList'],
214 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
227 CKEDITOR_CONFIGS['small'] = copy.copy(CKEDITOR_CONFIGS['default'])
228 CKEDITOR_CONFIGS['small']['height'] = 150
230 HAYSTACK_CONNECTIONS = {
232 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
233 'URL': 'http://127.0.0.1:8985/solr/panik',
239 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
243 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
245 TAGGIT_TAGS_FROM_STRING = 'emissions.utils.custom_parse_tags'
247 AUTH_USER_MODEL = 'aa.User'
248 MEMBERSHIP_DEFAULT_AMOUNT = 10
250 LOGIN_REDIRECT_URL = '/'
251 WEBSITE_BASE_URL = 'https://www.radiopanik.org/'
253 NEWSLETTER_SENDER = 'info@radiopanik.org'
254 NEWSLETTER_DOMAIN = 'radiopanik.org'
255 NEWSLETTER_STYLE = """
256 body { color: #222; text-align: justify; }
257 h2, h3 { font-family: "Reglo"; }
258 h3 { margin-bottom: 0; }
259 h3 + p { margin-top: 0; }
260 p strong { color: black; }
261 h3 strong { text-transform: uppercase; color: blue; }
262 p a { color: black; text-decoration: none; border-bottom: 1px dotted black; }
263 p a:hover { border-bottom: 1px solid black; }
268 from panikombo.misc import COMBO_PUBLIC_TEMPLATES
270 COMBO_ASSET_SLOTS = {}
271 COMBO_DASHBOARD_ENABLED = False
272 COMBO_DEFAULT_PUBLIC_TEMPLATE = 'standard'
273 COMBO_MAP_TILE_URLTEMPLATE = ''
274 COMBO_MAP_ATTRIBUTION = ''
275 COMBO_MANAGE_HOME_COLLAPSE_PAGES = False
276 COMBO_SEARCH_SERVICES = {}
277 COMBO_PUBLIC_TEMPLATES_ROOT_PAGE = 'modeles'
278 POSTGRESQL_FTS_SEARCH_CONFIG = 'french_unaccent'
279 REQUESTS_TIMEOUT = 28
281 AUTO_RENDER_SELECT2_STATICS = False
283 PIGE_DOWNLOAD_BASE_URL = 'http://pige.panik/extractor/download.cgi'
284 STATS_VISIT_URL = None
285 REGIE_IPS = ['192.168.17.121', '192.168.17.120', '127.0.0.1']
289 'pwa_display': 'standalone',
290 'theme_color': "#000000",
293 FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755
294 FILE_UPLOAD_PERMISSIONS = 0o644
303 HAS_NEWSLETTERS = True
304 HAS_RECORDING_BUTTONS = False
305 HAS_MEMBERSHIP_SUPPORT = True
306 USE_EXTERNAL_SOUNDS = False
307 USE_AGENDA_ONLY_FIELD = False
308 HAS_EMISSION_CHATS = False
310 SITE_TITLE = 'PanikDB'
311 COMBO_CELL_ASSET_SLOTS = {}
312 COMBO_CELL_TEMPLATES = {}
313 WIKI_SEARCH_BASE_URL = None
314 CELL_CONDITIONS_ENABLED = False
316 local_settings_file = os.environ.get(
317 'PANIKDB_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')
319 if os.path.exists(local_settings_file):
320 exec(open(local_settings_file).read())
323 if DEBUG and DEBUG_TOOLBAR:
324 MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
325 INSTALLED_APPS += ('debug_toolbar',)
328 INSTALLED_APPS += ('raven.contrib.django.raven_compat',)