1 # Django settings for panikdb project.
5 from django.conf import global_settings
11 PROJECT_PATH = os.path.dirname(os.path.dirname(__file__))
14 ('Frederic Peters', 'fred@radiopanik.org'),
21 'ENGINE': 'django.db.backends.sqlite3',
22 'NAME': os.path.join(PROJECT_PATH, 'panikdb.sqlite3'),
26 # Hosts/domain names that are valid for this site; required if DEBUG is False
27 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
30 # Local time zone for this installation. Choices can be found here:
31 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
32 # although not all choices may be available on all operating systems.
33 # In a Windows environment this must be set to your system time zone.
34 TIME_ZONE = 'Europe/Brussels'
36 # Language code for this installation. All choices can be found here:
37 # http://www.i18nguy.com/unicode/language-identifiers.html
38 LANGUAGE_CODE = 'fr-be'
42 # If you set this to False, Django will make some optimizations so as not
43 # to load the internationalization machinery.
46 # If you set this to False, Django will not format dates, numbers and
47 # calendars according to the current locale.
50 # If you set this to False, Django will not use timezone-aware datetimes.
53 # Absolute filesystem path to the directory that will hold user-uploaded files.
54 # Example: "/var/www/example.com/media/"
55 MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
57 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
59 # Examples: "http://example.com/media/", "http://media.example.com/"
62 # Absolute path to the directory static files should be collected to.
63 # Don't put anything in this directory yourself; store your static files
64 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
65 # Example: "/var/www/example.com/static/"
66 STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
68 # URL prefix for static files.
69 # Example: "http://example.com/static/", "http://static.example.com/"
70 STATIC_URL = '/static/'
72 CKEDITOR_UPLOAD_PATH = 'uploads/'
73 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
75 # Additional locations of static files
77 # Put strings here, like "/home/html/static" or "C:/www/django/static".
78 # Always use forward slashes, even on Windows.
79 # Don't forget to use absolute paths, not relative paths.
80 os.path.join(PROJECT_PATH, 'panikdb', 'static'),
83 # List of finder classes that know how to find static files in
85 STATICFILES_FINDERS = (
86 'django.contrib.staticfiles.finders.FileSystemFinder',
87 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
88 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
91 # Make this unique, and don't share it with anybody.
92 SECRET_KEY = '(jwx-1y#d#vps93glikirr&tq_!^_4g+9-qj(jy#l=sllqw(^j'
94 # List of callables that know how to import templates from various sources.
96 'django.template.loaders.filesystem.Loader',
97 'django.template.loaders.app_directories.Loader',
98 # 'django.template.loaders.eggs.Loader',
101 MIDDLEWARE_CLASSES = (
102 'django.middleware.common.CommonMiddleware',
103 'django.contrib.sessions.middleware.SessionMiddleware',
104 'django.middleware.csrf.CsrfViewMiddleware',
105 'django.contrib.auth.middleware.AuthenticationMiddleware',
106 'django.contrib.messages.middleware.MessageMiddleware',
107 # Uncomment the next line for simple clickjacking protection:
108 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
111 ROOT_URLCONF = 'panikdb.urls'
113 # Python dotted path to the WSGI application used by Django's runserver.
114 WSGI_APPLICATION = 'panikdb.wsgi.application'
117 os.path.join(PROJECT_PATH, 'panikdb', 'templates'),
121 'django.contrib.auth',
122 'django.contrib.contenttypes',
123 'django.contrib.sessions',
124 'django.contrib.sites',
125 'django.contrib.messages',
126 'django.contrib.staticfiles',
127 'django.contrib.admin',
134 'django_bootstrap_staticfiles',
140 'panikdb.customtags',
153 # A sample logging configuration. The only tangible logging
154 # performed by this configuration is to send an email to
155 # the site admins on every HTTP 500 error when DEBUG=False.
156 # See http://docs.djangoproject.com/en/dev/topics/logging for
157 # more details on how to customize your logging configuration.
160 'disable_existing_loggers': False,
162 'require_debug_false': {
163 '()': 'django.utils.log.RequireDebugFalse'
169 'filters': ['require_debug_false'],
170 'class': 'django.utils.log.AdminEmailHandler'
175 'handlers': ['mail_admins'],
184 'allowedContent': True,
185 'filebrowserUploadUrl': '/ckeditor/upload/',
186 'filebrowserBrowseUrl': '/ckeditor/browse/',
187 'toolbar_Own': [['Source', 'Format', '-', 'Bold', 'Italic'],
188 ['NumberedList','BulletedList'],
189 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
197 HAYSTACK_CONNECTIONS = {
199 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
200 'URL': 'http://127.0.0.1:8985/solr/panik'
206 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
210 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
212 AUTH_USER_MODEL = 'aa.User'
213 LOGIN_REDIRECT_URL = '/'
214 WEBSITE_BASE_URL = 'http://www.radiopanik.org/'
216 NEWSLETTER_SENDER = 'info@radiopanik.org'
217 NEWSLETTER_DOMAIN = 'radiopanik.org'
218 NEWSLETTER_STYLE = """
219 body { color: #222; text-align: justify; }
220 h2, h3 { font-family: "Reglo"; }
221 h3 { margin-bottom: 0; }
222 h3 + p { margin-top: 0; }
223 p strong { color: black; }
224 h3 strong { text-transform: uppercase; color: blue; }
225 p a { color: black; text-decoration: none; border-bottom: 1px dotted black; }
226 p a:hover { border-bottom: 1px solid black; }
231 from panikombo.misc import COMBO_PUBLIC_TEMPLATES
232 COMBO_DEFAULT_PUBLIC_TEMPLATE = 'standard'
234 AUTO_RENDER_SELECT2_STATICS = False
236 PIGE_DOWNLOAD_BASE_URL = 'http://pige.panik/extractor/download.cgi'
240 TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + \
241 ('panikdb.context_processors.internal_ip',)
245 from local_settings import *
249 if DEBUG and DEBUG_TOOLBAR:
250 MIDDLEWARE_CLASSES += (
251 'debug_toolbar.middleware.DebugToolbarMiddleware',
259 'raven.contrib.django.raven_compat',