]> git.0d.be Git - panikdb.git/blob - panikdb/settings.py
add left/right icons, for calendar popup
[panikdb.git] / panikdb / settings.py
1 # Django settings for panikdb project.
2
3 import os
4
5 DEBUG = True
6 TEMPLATE_DEBUG = DEBUG
7 DEBUG_TOOLBAR = True
8
9 PROJECT_PATH = os.path.dirname(os.path.dirname(__file__))
10
11 ADMINS = (
12     ('Frederic Peters', 'fred@radiopanik.org'),
13 )
14
15 MANAGERS = ADMINS
16
17 DATABASES = {
18     'default': {
19         'ENGINE': 'django.db.backends.sqlite3',
20         'NAME': os.path.join(PROJECT_PATH, 'panikdb.sqlite3'),
21     }
22 }
23
24 # Hosts/domain names that are valid for this site; required if DEBUG is False
25 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
26 ALLOWED_HOSTS = []
27
28 # Local time zone for this installation. Choices can be found here:
29 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
30 # although not all choices may be available on all operating systems.
31 # In a Windows environment this must be set to your system time zone.
32 TIME_ZONE = 'Europe/Brussels'
33
34 # Language code for this installation. All choices can be found here:
35 # http://www.i18nguy.com/unicode/language-identifiers.html
36 LANGUAGE_CODE = 'fr-be'
37
38 SITE_ID = 1
39
40 # If you set this to False, Django will make some optimizations so as not
41 # to load the internationalization machinery.
42 USE_I18N = True
43
44 # If you set this to False, Django will not format dates, numbers and
45 # calendars according to the current locale.
46 USE_L10N = True
47
48 # If you set this to False, Django will not use timezone-aware datetimes.
49 USE_TZ = False
50
51 # Absolute filesystem path to the directory that will hold user-uploaded files.
52 # Example: "/var/www/example.com/media/"
53 MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
54
55 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
56 # trailing slash.
57 # Examples: "http://example.com/media/", "http://media.example.com/"
58 MEDIA_URL = '/media/'
59
60 # Absolute path to the directory static files should be collected to.
61 # Don't put anything in this directory yourself; store your static files
62 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
63 # Example: "/var/www/example.com/static/"
64 STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
65
66 # URL prefix for static files.
67 # Example: "http://example.com/static/", "http://static.example.com/"
68 STATIC_URL = '/static/'
69
70 CKEDITOR_UPLOAD_PATH = 'uploads/'
71 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
72
73 # Additional locations of static files
74 STATICFILES_DIRS = (
75     # Put strings here, like "/home/html/static" or "C:/www/django/static".
76     # Always use forward slashes, even on Windows.
77     # Don't forget to use absolute paths, not relative paths.
78     os.path.join(PROJECT_PATH, 'panikdb', 'static'),
79 )
80
81 # List of finder classes that know how to find static files in
82 # various locations.
83 STATICFILES_FINDERS = (
84     'django.contrib.staticfiles.finders.FileSystemFinder',
85     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
86 #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
87 )
88
89 # Make this unique, and don't share it with anybody.
90 SECRET_KEY = '(jwx-1y#d#vps93glikirr&tq_!^_4g+9-qj(jy#l=sllqw(^j'
91
92 # List of callables that know how to import templates from various sources.
93 TEMPLATE_LOADERS = (
94     'django.template.loaders.filesystem.Loader',
95     'django.template.loaders.app_directories.Loader',
96 #     'django.template.loaders.eggs.Loader',
97 )
98
99 MIDDLEWARE_CLASSES = (
100     'django.middleware.common.CommonMiddleware',
101     'django.contrib.sessions.middleware.SessionMiddleware',
102     'django.middleware.csrf.CsrfViewMiddleware',
103     'django.contrib.auth.middleware.AuthenticationMiddleware',
104     'django.contrib.messages.middleware.MessageMiddleware',
105     # Uncomment the next line for simple clickjacking protection:
106     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
107 )
108
109 ROOT_URLCONF = 'panikdb.urls'
110
111 # Python dotted path to the WSGI application used by Django's runserver.
112 WSGI_APPLICATION = 'panikdb.wsgi.application'
113
114 TEMPLATE_DIRS = (
115     os.path.join(PROJECT_PATH, 'panikdb', 'templates'),
116 )
117
118 INSTALLED_APPS = (
119     'django.contrib.auth',
120     'django.contrib.contenttypes',
121     'django.contrib.sessions',
122     'django.contrib.sites',
123     'django.contrib.messages',
124     'django.contrib.staticfiles',
125     'django.contrib.admin',
126     'registration',
127     'ckeditor',
128     'haystack',
129     'taggit',
130     'jquery',
131     'datetimewidget',
132     'django_bootstrap_staticfiles',
133     'emissions',
134     'newsletter',
135     'matos',
136     'nonstop',
137     'panikdb.aa',
138     'panikdb.customtags',
139     'gadjo',
140     'combo.data',
141     'combo.manager',
142     'panikombo',
143     'django_select2',
144 )
145
146 # A sample logging configuration. The only tangible logging
147 # performed by this configuration is to send an email to
148 # the site admins on every HTTP 500 error when DEBUG=False.
149 # See http://docs.djangoproject.com/en/dev/topics/logging for
150 # more details on how to customize your logging configuration.
151 LOGGING = {
152     'version': 1,
153     'disable_existing_loggers': False,
154     'filters': {
155         'require_debug_false': {
156             '()': 'django.utils.log.RequireDebugFalse'
157         }
158     },
159     'handlers': {
160         'mail_admins': {
161             'level': 'ERROR',
162             'filters': ['require_debug_false'],
163             'class': 'django.utils.log.AdminEmailHandler'
164         }
165     },
166     'loggers': {
167         'django.request': {
168             'handlers': ['mail_admins'],
169             'level': 'ERROR',
170             'propagate': True,
171         },
172     }
173 }
174
175 CKEDITOR_CONFIGS = {
176     'default': {
177         'toolbar_Own': [['Source', 'Format', '-', 'Bold', 'Italic'],
178                         ['NumberedList','BulletedList'],
179                         ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
180                         ['Link', 'Unlink'],
181                         ['Image',],
182                         ['RemoveFormat',]],
183         'toolbar': 'Own',
184     },
185 }
186
187 HAYSTACK_CONNECTIONS = {
188     'default': {
189         'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
190         'URL': 'http://127.0.0.1:8985/solr/panik'
191     },
192 }
193
194 CACHES = {
195     'default': {
196         'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
197     },
198 }
199
200 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
201
202 AUTH_USER_MODEL = 'aa.User'
203 LOGIN_REDIRECT_URL = '/'
204 WEBSITE_BASE_URL = 'http://www.radiopanik.org/'
205
206 NEWSLETTER_SENDER = 'info@radiopanik.org'
207 NEWSLETTER_DOMAIN = 'radiopanik.org'
208 NEWSLETTER_STYLE = """
209 body { color: #222; text-align: justify; }
210 h2, h3 { font-family: "Reglo"; }
211 h3 { margin-bottom: 0; }
212 h3 + p { margin-top: 0; }
213 p strong { color: black; }
214 h3 strong { text-transform: uppercase; color: blue; }
215 p a { color: black; text-decoration: none; border-bottom: 1px dotted black; }
216 p a:hover { border-bottom: 1px solid black; }
217 """
218
219 RAVEN_CONFIG = None
220
221 COMBO_PUBLIC_TEMPLATES = {
222     'standard': {
223         'name': 'Standard',
224         'template': 'combo/page_template.html',
225         'placeholders': {
226             'content': {
227                 'name': 'Content',
228             },
229         }
230     },
231 }
232
233 AUTO_RENDER_SELECT2_STATICS = False
234
235 try:
236     from local_settings import *
237 except ImportError:
238     pass
239
240 if DEBUG and DEBUG_TOOLBAR:
241     MIDDLEWARE_CLASSES += (
242         'debug_toolbar.middleware.DebugToolbarMiddleware',
243     )
244     INSTALLED_APPS += (
245         'debug_toolbar',
246     )
247
248 if RAVEN_CONFIG:
249     INSTALLED_APPS += (
250         'raven.contrib.django.raven_compat',
251     )