author | cavaliet |
Thu, 17 Oct 2013 12:33:17 +0200 | |
changeset 128 | 6ffc59b2f7a0 |
parent 110 | 7da60a0dd2bb |
child 159 | 662f8f9676f6 |
permissions | -rw-r--r-- |
0 | 1 |
# -*- coding: utf-8 -*- |
2 |
#@PydevCodeAnalysisIgnore |
|
3 |
import os.path |
|
4 |
import ldtplatform |
|
5 |
# Django settings for project. |
|
6 |
||
7 |
DEBUG = True |
|
8 |
TEMPLATE_DEBUG = DEBUG |
|
9 |
||
10 |
ADMINS = ( |
|
11 |
# ('Your Name', 'your_email@domain.com'), |
|
12 |
) |
|
13 |
||
14 |
MANAGERS = ADMINS |
|
15 |
||
16 |
DATABASES = { |
|
17 |
'default': { |
|
18 |
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
19 |
'NAME': '', # Or path to database file if using sqlite3. |
|
20 |
'USER': '', # Not used with sqlite3. |
|
21 |
'PASSWORD': '', # Not used with sqlite3. |
|
22 |
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
|
23 |
'PORT': '', # Set to empty string for default. Not used with sqlite3. |
|
24 |
} |
|
25 |
} |
|
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 |
# If running in a Windows environment this must be set to the same as your |
|
31 |
# system time zone. |
|
32 |
TIME_ZONE = 'UTC' |
|
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-fr' |
|
37 |
||
38 |
ugettext = lambda s: s |
|
39 |
||
40 |
LANGUAGES = ( |
|
41 |
('fr', ugettext('French')), |
|
42 |
('en', ugettext('English')), |
|
43 |
('ja', ugettext('Japanese')), |
|
44 |
) |
|
45 |
||
46 |
||
47 |
SITE_ID = 1 |
|
48 |
||
49 |
# If you set this to False, Django will make some optimizations so as not |
|
50 |
# to load the internationalization machinery. |
|
51 |
USE_I18N = True |
|
52 |
||
53 |
# Absolute path to the directory that holds media. |
|
54 |
# Example: "/home/media/media.lawrence.com/" |
|
55 |
#MEDIA_ROOT = '' |
|
56 |
||
57 |
# Root of static files used by each app, generated by code or uploaded by users |
|
58 |
#STATIC_URL = '/static/' |
|
59 |
||
60 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
61 |
# trailing slash if there is a path component (optional in other cases). |
|
62 |
# Examples: "http://media.lawrence.com", "http://example.com/media/" |
|
63 |
#MEDIA_URL = '' |
|
64 |
||
65 |
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
|
66 |
# trailing slash. |
|
67 |
# Examples: "http://foo.com/media/", "/media/". |
|
68 |
||
69 |
#LDT_MEDIA_PREFIX = '/ldt/' |
|
70 |
||
71 |
# Make this unique, and don't share it with anybody. |
|
72 |
SECRET_KEY = 't^lii5_z@tho$%6t&b#dm#t9nz$$ylyclxvkdiyqbl+(dnt(ma' |
|
73 |
||
74 |
# List of callables that know how to import templates from various sources. |
|
75 |
TEMPLATE_LOADERS = ( |
|
76 |
'django.template.loaders.filesystem.Loader', |
|
77 |
'django.template.loaders.app_directories.Loader', |
|
78 |
# 'django.template.loaders.eggs.Loader', |
|
79 |
) |
|
80 |
||
81 |
MIDDLEWARE_CLASSES = ( |
|
82 |
'django.middleware.cache.UpdateCacheMiddleware', |
|
83 |
'django.middleware.common.CommonMiddleware', |
|
84 |
'django.middleware.cache.FetchFromCacheMiddleware', |
|
85 |
'django.middleware.gzip.GZipMiddleware', |
|
86 |
'ldt.ldt_utils.middleware.swfupload.SWFUploadMiddleware', |
|
87 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
88 |
'django.middleware.csrf.CsrfViewMiddleware', |
|
89 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
90 |
#'django.middleware.locale.LocaleMiddleware', |
|
91 |
'django.contrib.messages.middleware.MessageMiddleware', |
|
92 |
'django_openid_consumer.middleware.OpenIDMiddleware', |
|
93 |
'ldt.ldt_utils.middleware.userprofile.LanguageMiddleware', |
|
94 |
'ldt.security.middleware.SecurityMiddleware', |
|
95 |
) |
|
96 |
||
97 |
TEMPLATE_CONTEXT_PROCESSORS = ( |
|
98 |
"django.core.context_processors.request", |
|
99 |
"django.contrib.auth.context_processors.auth", |
|
100 |
"django.core.context_processors.debug", |
|
101 |
"django.core.context_processors.i18n", |
|
102 |
"django.core.context_processors.media", |
|
103 |
"django.core.context_processors.static", |
|
104 |
"ldt.utils.context_processors.ldt_context", |
|
105 |
) |
|
106 |
||
107 |
||
108 |
ROOT_URLCONF = 'ldtplatform.urls' |
|
109 |
||
110 |
TEMPLATE_DIRS = ( |
|
111 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
112 |
# Always use forward slashes, even on Windows. |
|
113 |
# Don't forget to use absolute paths, not relative paths. |
|
114 |
os.path.join(os.path.basename(__file__), 'templates'), |
|
115 |
os.path.join(os.path.dirname(__file__), 'templates'), |
|
116 |
) |
|
117 |
||
118 |
FIXTURES_DIRS = ( |
|
119 |
os.path.join(os.path.basename(__file__), 'fixtures'), |
|
120 |
) |
|
121 |
||
122 |
INSTALLED_APPS = ( |
|
123 |
'django_extensions', |
|
124 |
'django.contrib.auth', |
|
125 |
'django.contrib.contenttypes', |
|
126 |
'django.contrib.sessions', |
|
127 |
'django.contrib.sites', |
|
128 |
'django.contrib.messages', |
|
129 |
'django.contrib.admin', |
|
130 |
'django.contrib.staticfiles', |
|
131 |
'haystack', |
|
102 | 132 |
'tastypie', |
133 |
'guardian', |
|
0 | 134 |
'tagging', |
102 | 135 |
'registration', |
0 | 136 |
'oauth_provider', |
137 |
'django_openid_consumer', |
|
138 |
'social_auth', |
|
139 |
'south', |
|
140 |
'sorl.thumbnail', |
|
102 | 141 |
'ldt', |
142 |
'ldt.core', |
|
143 |
'ldt.security', |
|
144 |
'ldt.user', |
|
145 |
'ldt.ldt_utils', |
|
146 |
'ldt.text', |
|
147 |
'ldt.management', |
|
148 |
'ldt.indexation', |
|
103 | 149 |
'hashcut', |
58 | 150 |
'chunked_uploads', |
102 | 151 |
'ldtplatform', |
110
7da60a0dd2bb
update requirements (ldt, hashcut and metadatacomposer) and version number to 2.10
cavaliet
parents:
109
diff
changeset
|
152 |
'metadatacomposer', |
0 | 153 |
) |
154 |
||
102 | 155 |
#AUTH_PROFILE_MODULE = 'user.UserProfile' |
156 |
AUTH_USER_MODEL = 'user.LdtUser' |
|
157 |
INITIAL_CUSTOM_USER_MIGRATION = "0009_rename_auth_user_to_user_ldt_user" |
|
0 | 158 |
|
159 |
DECOUPAGE_BLACKLIST = ( |
|
160 |
"de_PPP", |
|
161 |
) |
|
162 |
||
163 |
ZIP_BLACKLIST = ( |
|
164 |
"__MACOSX", |
|
165 |
) |
|
166 |
||
167 |
AUTHENTICATION_BACKENDS = ( |
|
168 |
'social_auth.backends.twitter.TwitterBackend', |
|
169 |
'social_auth.backends.facebook.FacebookBackend', |
|
170 |
# 'social_auth.backends.google.GoogleOAuthBackend', |
|
171 |
# 'social_auth.backends.google.GoogleOAuth2Backend', |
|
172 |
'social_auth.backends.google.GoogleBackend', |
|
173 |
'social_auth.backends.yahoo.YahooBackend', |
|
174 |
# 'social_auth.backends.contrib.linkedin.LinkedinBackend', |
|
175 |
# 'social_auth.backends.contrib.LiveJournalBackend', |
|
176 |
# 'social_auth.backends.contrib.orkut.OrkutBackend', |
|
177 |
'social_auth.backends.OpenIDBackend', |
|
178 |
'django.contrib.auth.backends.ModelBackend', |
|
179 |
'guardian.backends.ObjectPermissionBackend', |
|
180 |
) |
|
102 | 181 |
#SOCIAL_AUTH_IMPORT_BACKENDS = ( |
182 |
# 'myproy.social_auth_extra_services', |
|
183 |
#) |
|
0 | 184 |
|
185 |
ACCOUNT_ACTIVATION_DAYS = 7 |
|
186 |
||
187 |
LDT_MAX_SEARCH_NUMBER = 50 |
|
188 |
LDT_JSON_DEFAULT_INDENT = 0 |
|
189 |
LDT_MAX_FRAGMENT_PER_SEARCH = 3 |
|
190 |
LDT_RESULTS_PER_PAGE = 10 |
|
191 |
LDT_MAX_CONTENTS_PER_PAGE = 10 |
|
192 |
LDT_MAX_PROJECTS_PER_PAGE = 10 |
|
193 |
LDT_FRONT_MEDIA_PER_PAGE = 9 |
|
81
8a667bb50299
add migration and update version number and requirements
cavaliet
parents:
21
diff
changeset
|
194 |
LDT_FRONT_PROJECTS_PER_PAGE = 12 |
0 | 195 |
|
196 |
OAUTH_PROVIDER_KEY_SIZE = 32 |
|
197 |
OAUTH_PROVIDER_SECRET_SIZE = 32 |
|
198 |
OAUTH_PROVIDER_VERIFIER_SIZE = 10 |
|
199 |
OAUTH_PROVIDER_CONSUMER_KEY_SIZE = 256 |
|
200 |
OAUTH_AUTHORIZE_VIEW = 'oauth_provider.views.fake_authorize_view' |
|
201 |
OAUTH_CALLBACK_VIEW = 'oauth_provider.views.fake_callback_view' |
|
202 |
TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8888" |
|
203 |
||
204 |
TWITTER_CONSUMER_KEY = 'UxAdbOLSo4Mx3CXIwDG9Eg' |
|
205 |
TWITTER_CONSUMER_SECRET = '2PcWgdjnJL6Vp8srB40jeAo0fjMEtDnUwmAia6EUww' |
|
206 |
FACEBOOK_APP_ID = '163134140411313' |
|
207 |
FACEBOOK_API_SECRET = 'f25e0754a44f0d90d3f4d9ea961ff012' |
|
208 |
||
209 |
SOCIAL_AUTH_COMPLETE_URL_NAME = 'complete' |
|
210 |
SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete' |
|
211 |
||
212 |
||
213 |
AUTO_INDEX_AFTER_SAVE = True |
|
214 |
||
215 |
ANONYMOUS_USER_ID = -1 |
|
216 |
||
217 |
WEB_VERSION = ldtplatform.get_version() |
|
218 |
||
219 |
DIVISIONS_FOR_STAT_ANNOTATION = 64 |
|
220 |
||
221 |
FRONT_TAG_LIST = [] |
|
222 |
||
223 |
DEFAULT_CONTENT_ICON = "thumbnails/contents/content_default_icon.png" |
|
224 |
DEFAULT_PROJECT_ICON = "thumbnails/projects/project_default_icon.png" |
|
225 |
DEFAULT_USER_ICON = "thumbnails/users/user_default_icon.png" |
|
226 |
DEFAULT_GROUP_ICON = "thumbnails/groups/group_default_icon.png" |
|
227 |
PROFILE_IMG_MAX_SIZE = 1000000 |
|
228 |
||
229 |
USE_GROUP_PERMISSIONS = ['Project', 'Content', 'Media'] |
|
230 |
FORBIDDEN_STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path=" |
|
231 |
PUBLIC_GROUP_NAME = 'everyone' |
|
232 |
MAX_USERS_SEARCH = 20 |
|
233 |
||
234 |
SYNTAX = { |
|
235 |
'++' : 'OK', |
|
236 |
'--' : 'KO', |
|
237 |
'==' : 'REF', |
|
238 |
'??' : 'Q' |
|
239 |
} |
|
240 |
||
241 |
EXTERNAL_STREAM_SRC = ['youtube.com', 'dailymotion.com', 'vimeo.com'] |
|
242 |
||
243 |
HAYSTACK_CONNECTIONS = { |
|
244 |
'default': { |
|
245 |
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', |
|
246 |
}, |
|
247 |
} |
|
59 | 248 |
HAYSTACK_SIGNAL_PROCESSOR = 'ldt.indexation.signals.LdtSignalProcessor' |
0 | 249 |
|
250 |
from config import * |
|
251 |
||
59 | 252 |
if not "SRC_BASE_URL" in locals(): |
253 |
SRC_BASE_URL = BASE_URL + __name__.split('.')[0] + '/' |
|
254 |
||
0 | 255 |
if not "LOGIN_URL" in locals(): |
59 | 256 |
LOGIN_URL = SRC_BASE_URL + 'accounts/login/' |
0 | 257 |
if not "LOGOUT_URL" in locals(): |
59 | 258 |
LOGOUT_URL = SRC_BASE_URL + 'accounts/disconnect/' |
0 | 259 |
if not "LOGIN_REDIRECT_URL" in locals(): |
59 | 260 |
LOGIN_REDIRECT_URL = SRC_BASE_URL + 'ldt/' |
0 | 261 |
if not "LOGOUT_REDIRECT_URL" in locals(): |
59 | 262 |
LOGOUT_REDIRECT_URL = SRC_BASE_URL + 'accounts/login' |
0 | 263 |
if not "PROFILE_REDIRECT_URL" in locals(): |
59 | 264 |
PROFILE_REDIRECT_URL = SRC_BASE_URL + 'auth_accounts/create/profile' |
0 | 265 |
|
266 |
if not "LOGIN_ERROR_URL" in locals(): |
|
59 | 267 |
LOGIN_ERROR_URL = SRC_BASE_URL + 'accounts/login' |
0 | 268 |
|
269 |
# Used in a lot of templates |
|
270 |
if not "LDT_MEDIA_PREFIX" in locals(): |
|
271 |
LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/' |
|
272 |
# URL that handles the media served from MEDIA_ROOT. |
|
273 |
if not "MEDIA_URL" in locals(): |
|
274 |
MEDIA_URL = BASE_URL + 'static/media/' |
|
275 |
||
276 |
#forced settings |
|
277 |
MAX_TAG_LENGTH = 255 |
|
278 |
FORCE_LOWERCASE_TAGS = True |
|
102 | 279 |
|
0 | 280 |
|
281 |