]> git.0d.be Git - panikweb.git/blob - panikweb/settings.py
basic project
[panikweb.git] / panikweb / settings.py
1 #!/usr/bin/env python
2 # coding: utf-8
3
4 import os
5
6 DEBUG = True  # Turn off for production
7 TEMPLATE_DEBUG = DEBUG
8 DEBUG_TOOLBAR = False
9
10 PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
11 ADMINS = (
12     # ('Your Name', 'your_email@domain.com'),
13 )
14 MANAGERS = ADMINS
15 DEFAULT_FROM_EMAIL = 'info@radiopanik.org'
16
17 LOGIN_REDIRECT_URL = '/'
18
19 DATABASES = {
20     'default': {
21         'ENGINE': 'django.db.backends.sqlite3',
22         'NAME': os.path.join(PROJECT_DIR, 'panikweb.sqlite3'),
23         'USER': '',
24         'PASSWORD': '',
25         'HOST': '',
26         'PORT': '',
27     },
28 }
29
30 ACCOUNT_ACTIVATION_DAYS = 7  # Activation window
31
32 #if django.VERSION[:2] < (1, 6):
33 TEST_RUNNER = 'discover_runner.DiscoverRunner'
34
35 # Local time zone for this installation. Choices can be found here:
36 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
37 # although not all choices may be available on all operating systems.
38 # If running in a Windows environment this must be set to the same as your
39 # system time zone.
40 TIME_ZONE = 'Europe/Brussels'
41
42 # Language code for this installation. All choices can be found here:
43 # http://www.i18nguy.com/unicode/language-identifiers.html
44 LANGUAGE_CODE = 'en-us'
45
46 LANGUAGES = (
47   ('fr', u'Français'),
48 )
49
50 SITE_ID = 1
51
52 # If you set this to False, Django will make some optimizations so as not
53 # to load the internationalization machinery.
54 USE_I18N = True
55
56 # Absolute filesystem path to the directory that will hold user-uploaded files.
57 # Example: "/home/media/media.lawrence.com/media/"
58 MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
59
60 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
61 # trailing slash.
62 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
63 MEDIA_URL = ''
64
65 # Absolute path to the directory static files should be collected to.
66 # Don't put anything in this directory yourself; store your static files
67 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
68 # Example: "/home/media/media.lawrence.com/static/"
69 STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticroot')
70
71 # URL prefix for static files.
72 # Example: "http://media.lawrence.com/static/"
73 STATIC_URL = '/static/'
74
75 # Additional locations of static files
76 STATICFILES_DIRS = (
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 )
81
82 # List of finder classes that know how to find static files in
83 # various locations.
84 STATICFILES_FINDERS = (
85     'django.contrib.staticfiles.finders.FileSystemFinder',
86     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
87 #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
88 )
89
90 # Make this unique, and don't share it with anybody.
91 SECRET_KEY = '3qm&amp;@6264-=st16)7_xa*ds+31e0mqqs@+*!ud7gzt$tq!b^qn'
92
93 # List of callables that know how to import templates from various sources.
94 TEMPLATE_LOADERS = (
95     'django.template.loaders.filesystem.Loader',
96     'django.template.loaders.app_directories.Loader',
97 #     'django.template.loaders.eggs.load_template_source',
98 )
99
100 MIDDLEWARE_CLASSES = (
101     'django.contrib.sessions.middleware.SessionMiddleware',
102     'django.middleware.locale.LocaleMiddleware',
103     'django.middleware.common.CommonMiddleware',
104     'django.middleware.csrf.CsrfViewMiddleware',
105     'django.contrib.auth.middleware.AuthenticationMiddleware',
106     'django.contrib.messages.middleware.MessageMiddleware',
107     #'request.middleware.RequestMiddleware',
108 )
109
110 ROOT_URLCONF = 'panikweb.urls'
111
112 TEMPLATE_DIRS = (
113     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
114     # Always use forward slashes, even on Windows.
115     # Don't forget to use absolute paths, not relative paths.
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     'django.contrib.admindocs',
127     'panikweb_templates',
128     'jquery',
129     'registration',
130     'ckeditor',
131     'datetimewidget',
132     'emissions',
133     'newsletter',
134 )
135
136 CKEDITOR_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads')
137 CKEDITOR_UPLOAD_PREFIX = '/media/uploads/'
138
139
140 try:
141     from local_settings import *
142 except ImportError, e:
143     pass
144
145 if DEBUG and DEBUG_TOOLBAR:
146     MIDDLEWARE_CLASSES += (
147         'debug_toolbar.middleware.DebugToolbarMiddleware',
148     )
149     INSTALLED_APPS += (
150         'debug_toolbar',
151     )
152     DEBUG_TOOLBAR_CONFIG = {
153         'INTERCEPT_REDIRECTS': False,
154     }
155
156