]> git.0d.be Git - panikdb.git/blob - panikdb/settings.py
add missing 'registration' app to settings
[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 = os.path.join(MEDIA_ROOT, '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     'south',
127     'registration',
128     'ckeditor',
129     'haystack',
130     'taggit',
131     'jquery',
132     'datetimewidget',
133     'django_bootstrap_staticfiles',
134     'emissions',
135     'newsletter',
136     'panikdb.aa',
137     'panikdb.customtags',
138 )
139
140 # A sample logging configuration. The only tangible logging
141 # performed by this configuration is to send an email to
142 # the site admins on every HTTP 500 error when DEBUG=False.
143 # See http://docs.djangoproject.com/en/dev/topics/logging for
144 # more details on how to customize your logging configuration.
145 LOGGING = {
146     'version': 1,
147     'disable_existing_loggers': False,
148     'filters': {
149         'require_debug_false': {
150             '()': 'django.utils.log.RequireDebugFalse'
151         }
152     },
153     'handlers': {
154         'mail_admins': {
155             'level': 'ERROR',
156             'filters': ['require_debug_false'],
157             'class': 'django.utils.log.AdminEmailHandler'
158         }
159     },
160     'loggers': {
161         'django.request': {
162             'handlers': ['mail_admins'],
163             'level': 'ERROR',
164             'propagate': True,
165         },
166     }
167 }
168
169 CKEDITOR_CONFIGS = {
170     'default': {
171         'toolbar_Own': [['Source', 'Format', '-', 'Bold', 'Italic'],
172                         ['NumberedList','BulletedList'],
173                         ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
174                         ['Link', 'Unlink'],
175                         ['Image',],
176                         ['RemoveFormat',]],
177         'toolbar': 'Own',
178     },
179 }
180
181 HAYSTACK_CONNECTIONS = {
182     'default': {
183         'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
184         'URL': 'http://127.0.0.1:8985/solr/panik'
185     },
186 }
187
188 CACHES = {
189     'default': {
190         'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
191     },
192 }
193
194 AUTH_USER_MODEL = 'aa.User'
195 LOGIN_REDIRECT_URL = '/'
196 WEBSITE_BASE_URL = 'http://www.radiopanik.org/'
197
198 NEWSLETTER_SENDER = 'info@radiopanik.org'
199 NEWSLETTER_DOMAIN = 'radiopanik.org'
200 NEWSLETTER_STYLE = """
201 body { color: #222; text-align: justify; }
202 h2, h3 { font-family: "Reglo"; }
203 h3 { margin-bottom: 0; }
204 h3 + p { margin-top: 0; }
205 p strong { color: black; }
206 h3 strong { text-transform: uppercase; color: blue; }
207 p a { color: black; text-decoration: none; border-bottom: 1px dotted black; }
208 p a:hover { border-bottom: 1px solid black; }
209 """
210
211 RAVEN_CONFIG = None
212
213 try:
214     from local_settings import *
215 except ImportError:
216     pass
217
218 if DEBUG and DEBUG_TOOLBAR:
219     MIDDLEWARE_CLASSES += (
220         'debug_toolbar.middleware.DebugToolbarMiddleware',
221     )
222     INSTALLED_APPS += (
223         'debug_toolbar',
224     )
225
226 if RAVEN_CONFIG:
227     INSTALLED_APPS += (
228         'raven.contrib.django.raven_compat',
229     )