]> git.0d.be Git - panikdb.git/blob - panikdb/settings.py
add django-registration, and required to be logged in for the emissions views
[panikdb.git] / panikdb / settings.py
1 # Django settings for panikdb project.
2
3 import os
4
5 DEBUG = True
6 TEMPLATE_DEBUG = DEBUG
7
8 PROJECT_PATH = os.path.dirname(os.path.dirname(__file__))
9
10 ADMINS = (
11     ('Frederic Peters', 'fred@radiopanik.org'),
12 )
13
14 MANAGERS = ADMINS
15
16 DATABASES = {
17     'default': {
18         'ENGINE': 'django.db.backends.sqlite3',
19         'NAME': os.path.join(PROJECT_PATH, 'panikdb.sqlite3'),
20     }
21 }
22
23 # Hosts/domain names that are valid for this site; required if DEBUG is False
24 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
25 ALLOWED_HOSTS = []
26
27 # Local time zone for this installation. Choices can be found here:
28 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
29 # although not all choices may be available on all operating systems.
30 # In a Windows environment this must be set to your system time zone.
31 TIME_ZONE = 'Europe/Brussels'
32
33 # Language code for this installation. All choices can be found here:
34 # http://www.i18nguy.com/unicode/language-identifiers.html
35 LANGUAGE_CODE = 'fr-be'
36
37 SITE_ID = 1
38
39 # If you set this to False, Django will make some optimizations so as not
40 # to load the internationalization machinery.
41 USE_I18N = True
42
43 # If you set this to False, Django will not format dates, numbers and
44 # calendars according to the current locale.
45 USE_L10N = True
46
47 # If you set this to False, Django will not use timezone-aware datetimes.
48 USE_TZ = False
49
50 # Absolute filesystem path to the directory that will hold user-uploaded files.
51 # Example: "/var/www/example.com/media/"
52 MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
53
54 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
55 # trailing slash.
56 # Examples: "http://example.com/media/", "http://media.example.com/"
57 MEDIA_URL = '/media/'
58
59 # Absolute path to the directory static files should be collected to.
60 # Don't put anything in this directory yourself; store your static files
61 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
62 # Example: "/var/www/example.com/static/"
63 STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
64
65 # URL prefix for static files.
66 # Example: "http://example.com/static/", "http://static.example.com/"
67 STATIC_URL = '/static/'
68
69 CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads')
70 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
71
72 # Additional locations of static files
73 STATICFILES_DIRS = (
74     # Put strings here, like "/home/html/static" or "C:/www/django/static".
75     # Always use forward slashes, even on Windows.
76     # Don't forget to use absolute paths, not relative paths.
77     os.path.join(PROJECT_PATH, 'panikdb', 'static'),
78 )
79
80 # List of finder classes that know how to find static files in
81 # various locations.
82 STATICFILES_FINDERS = (
83     'django.contrib.staticfiles.finders.FileSystemFinder',
84     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
85 #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
86 )
87
88 # Make this unique, and don't share it with anybody.
89 SECRET_KEY = '(jwx-1y#d#vps93glikirr&tq_!^_4g+9-qj(jy#l=sllqw(^j'
90
91 # List of callables that know how to import templates from various sources.
92 TEMPLATE_LOADERS = (
93     'django.template.loaders.filesystem.Loader',
94     'django.template.loaders.app_directories.Loader',
95 #     'django.template.loaders.eggs.Loader',
96 )
97
98 MIDDLEWARE_CLASSES = (
99     'django.middleware.common.CommonMiddleware',
100     'django.contrib.sessions.middleware.SessionMiddleware',
101     'django.middleware.csrf.CsrfViewMiddleware',
102     'django.contrib.auth.middleware.AuthenticationMiddleware',
103     'django.contrib.messages.middleware.MessageMiddleware',
104     # Uncomment the next line for simple clickjacking protection:
105     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
106 )
107
108 ROOT_URLCONF = 'panikdb.urls'
109
110 # Python dotted path to the WSGI application used by Django's runserver.
111 WSGI_APPLICATION = 'panikdb.wsgi.application'
112
113 TEMPLATE_DIRS = (
114     os.path.join(PROJECT_PATH, 'panikdb', 'templates'),
115 )
116
117 INSTALLED_APPS = (
118     'django.contrib.auth',
119     'django.contrib.contenttypes',
120     'django.contrib.sessions',
121     'django.contrib.sites',
122     'django.contrib.messages',
123     'django.contrib.staticfiles',
124     'django.contrib.admin',
125     'south',
126     'ckeditor',
127     'haystack',
128     'taggit',
129     'panikdb.emissions',
130 )
131
132 # A sample logging configuration. The only tangible logging
133 # performed by this configuration is to send an email to
134 # the site admins on every HTTP 500 error when DEBUG=False.
135 # See http://docs.djangoproject.com/en/dev/topics/logging for
136 # more details on how to customize your logging configuration.
137 LOGGING = {
138     'version': 1,
139     'disable_existing_loggers': False,
140     'filters': {
141         'require_debug_false': {
142             '()': 'django.utils.log.RequireDebugFalse'
143         }
144     },
145     'handlers': {
146         'mail_admins': {
147             'level': 'ERROR',
148             'filters': ['require_debug_false'],
149             'class': 'django.utils.log.AdminEmailHandler'
150         }
151     },
152     'loggers': {
153         'django.request': {
154             'handlers': ['mail_admins'],
155             'level': 'ERROR',
156             'propagate': True,
157         },
158     }
159 }
160
161 CKEDITOR_CONFIGS = {
162     'default': {
163         'toolbar_Own': [['Source', 'Format', '-', 'Bold', 'Italic'],
164                         ['NumberedList','BulletedList'],
165                         ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
166                         ['Link', 'Unlink'],
167                         ['Image',]],
168         'toolbar': 'Own',
169     },
170 }
171
172 HAYSTACK_CONNECTIONS = {
173     'default': {
174         'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
175         'URL': 'http://127.0.0.1:8984/solr/panik'
176     },
177 }
178
179 LOGIN_REDIRECT_URL = '/'
180
181 try:
182     from local_settings import *
183 except ImportError:
184     pass