Mercurial > hg > savane-forge
annotate settings_default.py @ 253:2f5430cd1762
Logo: 'test!' -> 'test !' for clarity
author | Sylvain Beucler <beuc@beuc.net> |
---|---|
date | Mon, 09 Aug 2010 20:35:03 +0200 |
parents | 102ad12301aa |
children | 05d27bf8ca84 |
rev | line source |
---|---|
154 | 1 # Django settings for savane project. |
2 | |
3 from django.conf import global_settings | |
4 import os | |
5 | |
6 DEBUG = True | |
7 TEMPLATE_DEBUG = DEBUG | |
8 | |
9 ADMINS = ( | |
10 # ('Your Name', 'your_email@domain.com'), | |
11 ) | |
12 | |
13 MANAGERS = ADMINS | |
14 | |
161 | 15 DATABASES = { |
16 'default': { | |
17 'NAME': 'savane', | |
18 'ENGINE': 'django.db.backends.mysql', | |
19 'USER': 'root', | |
20 'PASSWORD': '', | |
21 } | |
22 } | |
154 | 23 |
24 # Local time zone for this installation. Choices can be found here: | |
25 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name | |
26 # although not all choices may be available on all operating systems. | |
27 # If running in a Windows environment this must be set to the same as your | |
28 # system time zone. | |
29 TIME_ZONE = 'America/Chicago' | |
30 | |
31 # Language code for this installation. All choices can be found here: | |
32 # http://www.i18nguy.com/unicode/language-identifiers.html | |
33 LANGUAGE_CODE = 'en-us' | |
34 | |
184 | 35 # http://docs.djangoproject.com/en/dev/topics/i18n/deployment/#how-django-discovers-language-preference |
36 ugettext = lambda s: s | |
37 LANGUAGES = ( | |
38 ('ca', ugettext('Catalan')), | |
39 ('de', ugettext('German')), | |
40 ('en', ugettext('English')), | |
41 ('es', ugettext('Spanish')), | |
42 ('fr', ugettext('French')), | |
43 ('it', ugettext('Italian')), | |
44 ('ja', ugettext('Japanese')), | |
45 ('pt_BR', ugettext('Portuguese (Brazil)')), | |
46 ('ru', ugettext('Russian')), | |
47 ('sv', ugettext('Swedish')), | |
48 ) | |
49 | |
154 | 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. | |
161 | 54 USE_I18N = True |
55 | |
56 # If you set this to False, Django will make some optimizations so as not | |
57 # to load the internationalization machinery. | |
58 USE_L10N=True | |
154 | 59 |
60 # Make this unique, and don't share it with anybody. | |
161 | 61 # TODO: re-generate this on first install, or something |
154 | 62 SECRET_KEY = 'r0u=mcmr$46vf6y3x4!lti5pza)p-3y@*u%5k!71)ie)1dha@$' |
63 | |
64 # List of callables that know how to import templates from various sources. | |
65 TEMPLATE_LOADERS = ( | |
66 'django.template.loaders.filesystem.load_template_source', | |
67 'django.template.loaders.app_directories.load_template_source', | |
68 # 'django.template.loaders.eggs.load_template_source', | |
69 ) | |
70 | |
71 TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( | |
166
e122a60f5815
Organized ExtendedUser<->ExtendedGroup relationship
Sylvain Beucler <beuc@beuc.net>
parents:
161
diff
changeset
|
72 'django.core.context_processors.request', |
154 | 73 'savane.context_processors.media', |
195
f62cfe91205f
Leverage 'Sites' to provide the current site name
Sylvain Beucler <beuc@beuc.net>
parents:
186
diff
changeset
|
74 'savane.context_processors.site_name', |
154 | 75 ) |
76 | |
77 MIDDLEWARE_CLASSES = ( | |
78 'django.middleware.common.CommonMiddleware', | |
79 'django.contrib.sessions.middleware.SessionMiddleware', | |
184 | 80 'django.middleware.locale.LocaleMiddleware', |
161 | 81 'django.middleware.csrf.CsrfViewMiddleware', |
154 | 82 'django.contrib.auth.middleware.AuthenticationMiddleware', |
161 | 83 'django.contrib.messages.middleware.MessageMiddleware', |
84 | |
154 | 85 'savane.middleware.debug.DebugFooter', |
186
6bc5e698e9c4
Interface to manage project members (TODO: search for members)
Sylvain Beucler <beuc@beuc.net>
parents:
184
diff
changeset
|
86 'savane.middleware.exception.HttpCatchAppExceptionMiddleware', |
154 | 87 ) |
88 | |
89 ROOT_URLCONF = 'urls' | |
90 | |
91 TEMPLATE_DIRS = ( | |
92 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". | |
93 # Always use forward slashes, even on Windows. | |
94 # Don't forget to use absolute paths, not relative paths. | |
155
fa9e96198be5
sbin/sv: works independently of pwd
Sylvain Beucler <beuc@beuc.net>
parents:
154
diff
changeset
|
95 os.path.join(os.path.dirname(__file__), 'templates'), |
154 | 96 ) |
97 | |
161 | 98 # Used by syncdb, etc. |
99 INSTALLED_APPS = ( | |
100 'django.contrib.auth', | |
101 'django.contrib.contenttypes', | |
102 'django.contrib.sessions', | |
103 'django.contrib.messages', | |
195
f62cfe91205f
Leverage 'Sites' to provide the current site name
Sylvain Beucler <beuc@beuc.net>
parents:
186
diff
changeset
|
104 'django.contrib.sites', |
161 | 105 |
106 'django.contrib.admin', | |
107 'django.contrib.admindocs', | |
108 | |
170
3ddd86437b55
Integrate django-registration in the project (TODO: auto-create an ExtendedUser)
Sylvain Beucler <beuc@beuc.net>
parents:
166
diff
changeset
|
109 'registration', |
3ddd86437b55
Integrate django-registration in the project (TODO: auto-create an ExtendedUser)
Sylvain Beucler <beuc@beuc.net>
parents:
166
diff
changeset
|
110 |
161 | 111 'savane.svmain', |
112 'savane.my', | |
113 ) | |
114 | |
115 | |
214
102ad12301aa
Confirm e-mail change by sending e-mail to the old and new addresses
Sylvain Beucler <beuc@beuc.net>
parents:
195
diff
changeset
|
116 # Paths |
161 | 117 LOGIN_URL = '/accounts/login/' |
118 LOGIN_REDIRECT_URL = '/my/' | |
154 | 119 |
120 # Applications media | |
155
fa9e96198be5
sbin/sv: works independently of pwd
Sylvain Beucler <beuc@beuc.net>
parents:
154
diff
changeset
|
121 STATIC_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'static_media/') |
154 | 122 STATIC_MEDIA_URL = '/static_media/' |
123 | |
124 # Media for Django auto-admin | |
125 ADMIN_MEDIA_PREFIX = '/admin_media/' | |
126 | |
127 # User-uploaded media (with trailing slashes) | |
161 | 128 MEDIA_ROOT = os.path.dirname(__file__) + '/upload/' |
129 MEDIA_URL = '/upload/' | |
154 | 130 |
161 | 131 # For a subdir: |
132 #subdir = '/savane' | |
133 #LOGIN_URL = subdir + '/accounts/login/' | |
134 #LOGIN_REDIRECT_URL = subdir + '/' | |
135 #REQUIRE_LOGIN_PATH = LOGIN_URL | |
136 #STATIC_MEDIA_URL = subdir + '/static_media/' | |
137 #MEDIA_URL = subdir + '/upload/' | |
170
3ddd86437b55
Integrate django-registration in the project (TODO: auto-create an ExtendedUser)
Sylvain Beucler <beuc@beuc.net>
parents:
166
diff
changeset
|
138 |
3ddd86437b55
Integrate django-registration in the project (TODO: auto-create an ExtendedUser)
Sylvain Beucler <beuc@beuc.net>
parents:
166
diff
changeset
|
139 |
214
102ad12301aa
Confirm e-mail change by sending e-mail to the old and new addresses
Sylvain Beucler <beuc@beuc.net>
parents:
195
diff
changeset
|
140 # E-mail |
102ad12301aa
Confirm e-mail change by sending e-mail to the old and new addresses
Sylvain Beucler <beuc@beuc.net>
parents:
195
diff
changeset
|
141 #DEFAULT_FROM_EMAIL='webmaster@localhost' |
102ad12301aa
Confirm e-mail change by sending e-mail to the old and new addresses
Sylvain Beucler <beuc@beuc.net>
parents:
195
diff
changeset
|
142 |
102ad12301aa
Confirm e-mail change by sending e-mail to the old and new addresses
Sylvain Beucler <beuc@beuc.net>
parents:
195
diff
changeset
|
143 |
170
3ddd86437b55
Integrate django-registration in the project (TODO: auto-create an ExtendedUser)
Sylvain Beucler <beuc@beuc.net>
parents:
166
diff
changeset
|
144 # 3rd-party configuration |
3ddd86437b55
Integrate django-registration in the project (TODO: auto-create an ExtendedUser)
Sylvain Beucler <beuc@beuc.net>
parents:
166
diff
changeset
|
145 |
3ddd86437b55
Integrate django-registration in the project (TODO: auto-create an ExtendedUser)
Sylvain Beucler <beuc@beuc.net>
parents:
166
diff
changeset
|
146 # django-registration |
3ddd86437b55
Integrate django-registration in the project (TODO: auto-create an ExtendedUser)
Sylvain Beucler <beuc@beuc.net>
parents:
166
diff
changeset
|
147 ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window |