| author | ymh <ymh.work@gmail.com> |
| Thu, 18 Aug 2011 10:36:40 +0200 | |
| changeset 136 | 37496f2c1fa9 |
| parent 122 | f3a013f66974 |
| parent 135 | 01f6e48255f7 |
| child 161 | ec99af8284f5 |
| permissions | -rw-r--r-- |
| 0 | 1 |
#@PydevCodeAnalysisIgnore |
2 |
import os.path |
|
3 |
# Django settings for project. |
|
4 |
||
5 |
DEBUG = True |
|
6 |
TEMPLATE_DEBUG = DEBUG |
|
7 |
||
8 |
ADMINS = ( |
|
9 |
# ('Your Name', 'your_email@domain.com'), |
|
10 |
) |
|
11 |
||
12 |
MANAGERS = ADMINS |
|
13 |
||
14 |
DATABASES = { |
|
15 |
'default': { |
|
16 |
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
17 |
'NAME': '', # Or path to database file if using sqlite3. |
|
18 |
'USER': '', # Not used with sqlite3. |
|
19 |
'PASSWORD': '', # Not used with sqlite3. |
|
20 |
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
|
21 |
'PORT': '', # Set to empty string for default. Not used with sqlite3. |
|
22 |
} |
|
23 |
} |
|
24 |
||
25 |
# Local time zone for this installation. Choices can be found here: |
|
26 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
27 |
# although not all choices may be available on all operating systems. |
|
28 |
# If running in a Windows environment this must be set to the same as your |
|
29 |
# system time zone. |
|
30 |
TIME_ZONE = 'Europe/Paris' |
|
31 |
||
32 |
# Language code for this installation. All choices can be found here: |
|
33 |
# http://www.i18nguy.com/unicode/language-identifiers.html |
|
34 |
LANGUAGE_CODE = 'fr-fr' |
|
35 |
||
36 |
ugettext = lambda s: s |
|
37 |
||
38 |
LANGUAGES = ( |
|
39 |
('fr', ugettext('French')), |
|
40 |
) |
|
41 |
||
42 |
||
43 |
SITE_ID = 1 |
|
44 |
||
45 |
# If you set this to False, Django will make some optimizations so as not |
|
46 |
# to load the internationalization machinery. |
|
47 |
USE_I18N = True |
|
48 |
||
49 |
# Absolute path to the directory that holds media. |
|
50 |
# Example: "/home/media/media.lawrence.com/" |
|
|
122
f3a013f66974
Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents:
109
diff
changeset
|
51 |
#MEDIA_ROOT = '' |
| 68 | 52 |
|
|
106
2affc8a44dfb
Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents:
104
diff
changeset
|
53 |
# Root of static files used by each app, generated by code or uploaded by users |
|
122
f3a013f66974
Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents:
109
diff
changeset
|
54 |
#STATIC_URL = '/static/' |
| 0 | 55 |
|
56 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
57 |
# trailing slash if there is a path component (optional in other cases). |
|
58 |
# Examples: "http://media.lawrence.com", "http://example.com/media/" |
|
|
122
f3a013f66974
Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents:
109
diff
changeset
|
59 |
#MEDIA_URL = '' |
| 0 | 60 |
|
61 |
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
|
62 |
# trailing slash. |
|
63 |
# Examples: "http://foo.com/media/", "/media/". |
|
|
122
f3a013f66974
Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents:
109
diff
changeset
|
64 |
#ADMIN_MEDIA_PREFIX = '/media/' |
| 0 | 65 |
|
|
122
f3a013f66974
Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents:
109
diff
changeset
|
66 |
#LDT_MEDIA_PREFIX = '/ldt/' |
| 0 | 67 |
|
68 |
# Make this unique, and don't share it with anybody. |
|
69 |
SECRET_KEY = 't^lii5_z@tho$%6t&b#dm#t9nz$$ylyclxvkdiyqbl+(dnt(ma' |
|
70 |
||
71 |
# List of callables that know how to import templates from various sources. |
|
72 |
TEMPLATE_LOADERS = ( |
|
73 |
'django.template.loaders.filesystem.Loader', |
|
74 |
'django.template.loaders.app_directories.Loader', |
|
75 |
# 'django.template.loaders.eggs.Loader', |
|
76 |
) |
|
77 |
||
78 |
MIDDLEWARE_CLASSES = ( |
|
| 76 | 79 |
'django.middleware.gzip.GZipMiddleware', |
| 0 | 80 |
'django.middleware.common.CommonMiddleware', |
|
71
8a881c9593d0
Add swfupload for local upload to create content view, with progress bar and error management.
cavaliet
parents:
68
diff
changeset
|
81 |
'ldt.ldt_utils.middleware.swfupload.SWFUploadMiddleware', |
| 0 | 82 |
'django.contrib.sessions.middleware.SessionMiddleware', |
83 |
'django.middleware.csrf.CsrfViewMiddleware', |
|
84 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
85 |
'django.middleware.locale.LocaleMiddleware', |
|
86 |
'django.contrib.messages.middleware.MessageMiddleware', |
|
| 68 | 87 |
'django_openid_consumer.middleware.OpenIDMiddleware', |
| 0 | 88 |
) |
89 |
||
90 |
TEMPLATE_CONTEXT_PROCESSORS = ( |
|
91 |
"django.core.context_processors.request", |
|
|
71
8a881c9593d0
Add swfupload for local upload to create content view, with progress bar and error management.
cavaliet
parents:
68
diff
changeset
|
92 |
"django.contrib.auth.context_processors.auth", |
| 0 | 93 |
"django.core.context_processors.debug", |
94 |
"django.core.context_processors.i18n", |
|
95 |
"django.core.context_processors.media", |
|
|
104
b62a2a3e272d
Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents:
103
diff
changeset
|
96 |
"django.core.context_processors.static", |
| 68 | 97 |
"ldt.utils.context_processors.ldtcontext", |
| 0 | 98 |
) |
99 |
||
100 |
||
| 68 | 101 |
|
| 6 | 102 |
ROOT_URLCONF = 'ldtplatform.urls' |
| 0 | 103 |
|
104 |
TEMPLATE_DIRS = ( |
|
105 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
106 |
# Always use forward slashes, even on Windows. |
|
107 |
# Don't forget to use absolute paths, not relative paths. |
|
108 |
os.path.join(os.path.basename(__file__), 'templates'), |
|
109 |
) |
|
110 |
||
| 68 | 111 |
FIXTURES_DIRS = ( |
112 |
os.path.join(os.path.basename(__file__), 'fixtures'), |
|
113 |
) |
|
114 |
||
| 0 | 115 |
INSTALLED_APPS = ( |
116 |
'django_extensions', |
|
117 |
'django.contrib.auth', |
|
118 |
'django.contrib.contenttypes', |
|
119 |
'django.contrib.sessions', |
|
120 |
'django.contrib.sites', |
|
121 |
'django.contrib.messages', |
|
122 |
'django.contrib.admin', |
|
|
104
b62a2a3e272d
Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents:
103
diff
changeset
|
123 |
'django.contrib.staticfiles', |
| 2 | 124 |
'ldtplatform', |
| 0 | 125 |
'registration', |
126 |
'tagging', |
|
127 |
'ldt', |
|
128 |
'ldt.core', |
|
129 |
'ldt.ldt_utils', |
|
| 68 | 130 |
'ldt.text', |
| 0 | 131 |
'ldt.user', |
132 |
'ldt.management', |
|
| 68 | 133 |
'oauth_provider', |
134 |
'django_openid_consumer', |
|
135 |
'piston', |
|
136 |
'social_auth', |
|
| 135 | 137 |
'south', |
| 0 | 138 |
) |
139 |
||
140 |
DECOUPAGE_BLACKLIST = ( |
|
141 |
"de_PPP", |
|
142 |
) |
|
143 |
||
144 |
ZIP_BLACKLIST = ( |
|
145 |
"__MACOSX", |
|
146 |
) |
|
147 |
||
| 68 | 148 |
AUTHENTICATION_BACKENDS = ( |
149 |
'social_auth.backends.twitter.TwitterBackend', |
|
150 |
'social_auth.backends.facebook.FacebookBackend', |
|
151 |
# 'social_auth.backends.google.GoogleOAuthBackend', |
|
152 |
# 'social_auth.backends.google.GoogleOAuth2Backend', |
|
153 |
'social_auth.backends.google.GoogleBackend', |
|
154 |
'social_auth.backends.yahoo.YahooBackend', |
|
155 |
# 'social_auth.backends.contrib.linkedin.LinkedinBackend', |
|
156 |
# 'social_auth.backends.contrib.LiveJournalBackend', |
|
157 |
# 'social_auth.backends.contrib.orkut.OrkutBackend', |
|
158 |
'social_auth.backends.OpenIDBackend', |
|
159 |
'django.contrib.auth.backends.ModelBackend', |
|
160 |
) |
|
161 |
SOCIAL_AUTH_IMPORT_BACKENDS = ( |
|
162 |
'myproy.social_auth_extra_services', |
|
163 |
) |
|
164 |
||
| 0 | 165 |
ACCOUNT_ACTIVATION_DAYS = 7 |
166 |
||
167 |
LDT_MAX_SEARCH_NUMBER = 50 |
|
168 |
LDT_JSON_DEFAULT_INDENT = 2 |
|
169 |
||
| 68 | 170 |
OAUTH_PROVIDER_KEY_SIZE = 32 |
171 |
OAUTH_PROVIDER_SECRET_SIZE = 32 |
|
172 |
OAUTH_PROVIDER_VERIFIER_SIZE = 10 |
|
173 |
OAUTH_PROVIDER_CONSUMER_KEY_SIZE = 256 |
|
174 |
OAUTH_AUTHORIZE_VIEW = 'oauth_provider.views.fake_authorize_view' |
|
175 |
OAUTH_CALLBACK_VIEW = 'oauth_provider.views.fake_callback_view' |
|
176 |
TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8888" |
|
177 |
||
178 |
TWITTER_CONSUMER_KEY = 'UxAdbOLSo4Mx3CXIwDG9Eg' |
|
179 |
TWITTER_CONSUMER_SECRET = '2PcWgdjnJL6Vp8srB40jeAo0fjMEtDnUwmAia6EUww' |
|
180 |
FACEBOOK_APP_ID = '163134140411313' |
|
181 |
FACEBOOK_API_SECRET = 'f25e0754a44f0d90d3f4d9ea961ff012' |
|
182 |
||
183 |
SOCIAL_AUTH_COMPLETE_URL_NAME = 'complete' |
|
184 |
SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete' |
|
185 |
||
|
103
5578dcb54f4d
merge context_processors.py and enable upload cancel and remove temp file. Creation of a session temp folder for upload.
cavaliet
parents:
76
diff
changeset
|
186 |
AUTO_INDEX_AFTER_SAVE = True |
| 0 | 187 |
|
188 |
from config import * |
|
189 |
||
| 73 | 190 |
if not "LOGIN_URL" in locals(): |
191 |
LOGIN_URL = BASE_URL + 'ldtplatform/accounts/login/' |
|
192 |
if not "LOGOUT_URL" in locals(): |
|
193 |
LOGOUT_URL = BASE_URL + 'ldtplatform/accounts/disconnect/' |
|
194 |
if not "LOGIN_REDIRECT_URL" in locals(): |
|
195 |
LOGIN_REDIRECT_URL = BASE_URL + 'ldtplatform/ldt/' |
|
196 |
if not "LOGOUT_REDIRECT_URL" in locals(): |
|
197 |
LOGOUT_REDIRECT_URL = BASE_URL + 'ldtplatform/accounts/login' |
|
198 |
if not "PROFILE_REDIRECT_URL" in locals(): |
|
199 |
PROFILE_REDIRECT_URL = BASE_URL + 'ldtplatform/auth_accounts/create/profile' |
|
| 68 | 200 |
|
| 73 | 201 |
if not "LOGIN_ERROR_URL" in locals(): |
202 |
LOGIN_ERROR_URL = BASE_URL + 'ldtplatform/accounts/login' |
|
| 0 | 203 |
|
| 73 | 204 |
if not "GLOBAL_LOG_LEVEL" in locals(): |
205 |
GLOBAL_LOG_LEVEL = LOG_LEVEL |
|
206 |
if not "GLOBAL_LOG_HANDLERS" in locals(): |
|
207 |
GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}] |
|
|
106
2affc8a44dfb
Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents:
104
diff
changeset
|
208 |
|
| 0 | 209 |
|
|
106
2affc8a44dfb
Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents:
104
diff
changeset
|
210 |
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
|
2affc8a44dfb
Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents:
104
diff
changeset
|
211 |
# trailing slash. |
|
2affc8a44dfb
Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents:
104
diff
changeset
|
212 |
# Examples: "http://foo.com/media/", "/media/". |
|
109
b823ac24bc88
update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents:
106
diff
changeset
|
213 |
if not "ADMIN_MEDIA_PREFIX" in locals(): |
|
b823ac24bc88
update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents:
106
diff
changeset
|
214 |
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/' |
|
106
2affc8a44dfb
Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents:
104
diff
changeset
|
215 |
# Used in a lot of templates |
|
109
b823ac24bc88
update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents:
106
diff
changeset
|
216 |
if not "LDT_MEDIA_PREFIX" in locals(): |
|
b823ac24bc88
update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents:
106
diff
changeset
|
217 |
LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/' |
|
106
2affc8a44dfb
Clean static_url management, add icons and clean settings.py and config.py.tmpl management with the static urls.
cavaliet
parents:
104
diff
changeset
|
218 |
# URL that handles the media served from MEDIA_ROOT. |
|
109
b823ac24bc88
update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents:
106
diff
changeset
|
219 |
if not "MEDIA_URL" in locals(): |
|
b823ac24bc88
update psycopg2 + settings template
ymh <ymh.work@gmail.com>
parents:
106
diff
changeset
|
220 |
MEDIA_URL = BASE_URL + 'static/media/' |