1 # Django settings for panikdb project.
5 from django.conf import global_settings
10 PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
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 LOCALE_PATHS = (os.path.join(PROJECT_DIR, 'panikdb', 'locale'),)
48 # If you set this to False, Django will not format dates, numbers and
49 # calendars according to the current locale.
52 # If you set this to False, Django will not use timezone-aware datetimes.
55 # Absolute filesystem path to the directory that will hold user-uploaded files.
56 # Example: "/var/www/example.com/media/"
57 MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
59 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
61 # Examples: "http://example.com/media/", "http://media.example.com/"
64 # Absolute path to the directory static files should be collected to.
65 # Don't put anything in this directory yourself; store your static files
66 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
67 # Example: "/var/www/example.com/static/"
68 STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
70 # URL prefix for static files.
71 # Example: "http://example.com/static/", "http://static.example.com/"
72 STATIC_URL = '/static/'
74 CKEDITOR_UPLOAD_PATH = 'uploads/'
75 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
77 # Additional locations of static files
79 # Put strings here, like "/home/html/static" or "C:/www/django/static".
80 # Always use forward slashes, even on Windows.
81 # Don't forget to use absolute paths, not relative paths.
82 os.path.join(PROJECT_PATH, 'panikdb', 'static'),
85 # List of finder classes that know how to find static files in
87 STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + \
88 ['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.contrib.auth.context_processors.auth',
103 'django.template.context_processors.debug',
104 'django.template.context_processors.i18n',
105 'django.template.context_processors.media',
106 'django.template.context_processors.static',
107 'django.template.context_processors.tz',
108 'django.contrib.messages.context_processors.messages',
109 'panikdb.context_processors.internal_ip',
117 MIDDLEWARE_CLASSES = (
118 'django.middleware.common.CommonMiddleware',
119 'django.contrib.sessions.middleware.SessionMiddleware',
120 'django.middleware.csrf.CsrfViewMiddleware',
121 'django.contrib.auth.middleware.AuthenticationMiddleware',
122 'django.contrib.messages.middleware.MessageMiddleware',
123 # Uncomment the next line for simple clickjacking protection:
124 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
127 ROOT_URLCONF = 'panikdb.urls'
129 # Python dotted path to the WSGI application used by Django's runserver.
130 WSGI_APPLICATION = 'panikdb.wsgi.application'
133 'django.contrib.auth',
134 'django.contrib.contenttypes',
135 'django.contrib.sessions',
136 'django.contrib.sites',
137 'django.contrib.messages',
138 'django.contrib.staticfiles',
139 'django.contrib.admin',
149 'panikdb.customtags',
157 'combo.apps.notifications',
165 # A sample logging configuration. The only tangible logging
166 # performed by this configuration is to send an email to
167 # the site admins on every HTTP 500 error when DEBUG=False.
168 # See http://docs.djangoproject.com/en/dev/topics/logging for
169 # more details on how to customize your logging configuration.
172 'disable_existing_loggers': False,
174 'require_debug_false': {
175 '()': 'django.utils.log.RequireDebugFalse'
181 'filters': ['require_debug_false'],
182 'class': 'django.utils.log.AdminEmailHandler'
187 'handlers': ['mail_admins'],
196 'allowedContent': True,
197 'filebrowserUploadUrl': '/ckeditor/upload/',
198 'filebrowserBrowseUrl': '/ckeditor/browse/',
199 'toolbar_Own': [['Source', 'Format', '-', 'Bold', 'Italic'],
200 ['NumberedList','BulletedList'],
201 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
209 HAYSTACK_CONNECTIONS = {
211 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
212 'URL': 'http://127.0.0.1:8985/solr/panik'
218 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
222 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
224 AUTH_USER_MODEL = 'aa.User'
225 LOGIN_REDIRECT_URL = '/'
226 WEBSITE_BASE_URL = 'http://www.radiopanik.org/'
228 NEWSLETTER_SENDER = 'info@radiopanik.org'
229 NEWSLETTER_DOMAIN = 'radiopanik.org'
230 NEWSLETTER_STYLE = """
231 body { color: #222; text-align: justify; }
232 h2, h3 { font-family: "Reglo"; }
233 h3 { margin-bottom: 0; }
234 h3 + p { margin-top: 0; }
235 p strong { color: black; }
236 h3 strong { text-transform: uppercase; color: blue; }
237 p a { color: black; text-decoration: none; border-bottom: 1px dotted black; }
238 p a:hover { border-bottom: 1px solid black; }
243 from panikombo.misc import COMBO_PUBLIC_TEMPLATES
244 COMBO_DEFAULT_PUBLIC_TEMPLATE = 'standard'
246 AUTO_RENDER_SELECT2_STATICS = False
248 PIGE_DOWNLOAD_BASE_URL = 'http://pige.panik/extractor/download.cgi'
252 FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755
253 FILE_UPLOAD_PERMISSIONS = 0o644
256 from local_settings import *
260 if DEBUG and DEBUG_TOOLBAR:
261 MIDDLEWARE_CLASSES += (
262 'debug_toolbar.middleware.DebugToolbarMiddleware',
270 'raven.contrib.django.raven_compat',