author | ymh <ymh.work@gmail.com> |
Thu, 16 Jul 2015 02:28:38 +0200 | |
changeset 16 | ad85999dd05c |
parent 9 | 3166a35f5f0d |
child 23 | 16303a95fdb8 |
permissions | -rw-r--r-- |
3 | 1 |
""" |
2 |
Django settings for remieplt project. |
|
3 |
||
4 |
Generated by 'django-admin startproject' using Django 1.8.2. |
|
5 |
||
6 |
For more information on this file, see |
|
7 |
https://docs.djangoproject.com/en/dev/topics/settings/ |
|
8 |
||
9 |
For the full list of settings and their values, see |
|
10 |
https://docs.djangoproject.com/en/dev/ref/settings/ |
|
11 |
""" |
|
12 |
||
13 |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
|
14 |
import os, remieplt |
|
15 |
||
16 |
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
|
17 |
||
18 |
||
19 |
# Quick-start development settings - unsuitable for production |
|
20 |
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/ |
|
21 |
||
22 |
# SECURITY WARNING: keep the secret key used in production secret! |
|
23 |
SECRET_KEY = None |
|
24 |
||
25 |
# SECURITY WARNING: don't run with debug turned on in production! |
|
26 |
DEBUG = False |
|
27 |
||
28 |
ALLOWED_HOSTS = [] |
|
29 |
||
30 |
||
31 |
# Application definition |
|
32 |
||
33 |
INSTALLED_APPS = ( |
|
34 |
'django_extensions', |
|
35 |
'django.contrib.admin', |
|
36 |
'django.contrib.auth', |
|
37 |
'django.contrib.contenttypes', |
|
38 |
'django.contrib.sessions', |
|
39 |
'django.contrib.messages', |
|
40 |
'django.contrib.staticfiles', |
|
41 |
'django.contrib.sites', |
|
42 |
'haystack', |
|
43 |
'corsheaders', |
|
44 |
'tastypie', |
|
45 |
'guardian', |
|
46 |
'taggit', |
|
47 |
'taggit_templatetags', |
|
48 |
'registration', |
|
49 |
'oauth_provider', |
|
50 |
'social.apps.django_app.default', |
|
51 |
'sorl.thumbnail', |
|
52 |
'ldt', |
|
53 |
'ldt.core', |
|
54 |
'ldt.security', |
|
55 |
'ldt.user', |
|
56 |
'ldt.ldt_utils', |
|
57 |
'ldt.text', |
|
58 |
'ldt.management', |
|
59 |
'ldt.indexation', |
|
60 |
'chunked_uploads', |
|
61 |
'remie' |
|
62 |
) |
|
63 |
||
64 |
MIDDLEWARE_CLASSES = ( |
|
65 |
'django.middleware.cache.UpdateCacheMiddleware', |
|
66 |
'django.middleware.cache.FetchFromCacheMiddleware', |
|
67 |
'corsheaders.middleware.CorsMiddleware', |
|
68 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
69 |
'django.middleware.common.CommonMiddleware', |
|
70 |
'django.middleware.gzip.GZipMiddleware', |
|
71 |
'django.middleware.csrf.CsrfViewMiddleware', |
|
72 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
73 |
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', |
|
74 |
'django.contrib.messages.middleware.MessageMiddleware', |
|
75 |
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
76 |
'django.middleware.security.SecurityMiddleware', |
|
77 |
'ldt.ldt_utils.middleware.swfupload.SWFUploadMiddleware', |
|
78 |
'ldt.ldt_utils.middleware.userprofile.LanguageMiddleware', |
|
79 |
'ldt.security.middleware.SecurityMiddleware', |
|
9
3166a35f5f0d
Added CAS Auth middleware and CAS Login urls to remie platform + removed authserver/homestead/.vagrant from repo
durandn
parents:
3
diff
changeset
|
80 |
'remie.middleware.cas_proxy_auth.CASAuthenticationMiddleware' |
3 | 81 |
) |
82 |
||
83 |
ROOT_URLCONF = 'remieplt.urls' |
|
84 |
||
85 |
TEMPLATES = [ |
|
86 |
{ |
|
87 |
'BACKEND': 'django.template.backends.django.DjangoTemplates', |
|
88 |
'DIRS': [os.path.join(os.path.dirname(os.path.dirname(__file__)), 'templates')], |
|
89 |
'APP_DIRS': True, |
|
90 |
'OPTIONS': { |
|
91 |
'context_processors': [ |
|
92 |
'django.template.context_processors.debug', |
|
93 |
'django.template.context_processors.request', |
|
94 |
'django.contrib.auth.context_processors.auth', |
|
95 |
'django.template.context_processors.i18n', |
|
96 |
'django.template.context_processors.media', |
|
97 |
'django.template.context_processors.static', |
|
98 |
'django.template.context_processors.tz', |
|
99 |
'django.contrib.messages.context_processors.messages', |
|
100 |
'ldt.utils.context_processors.ldt_context', |
|
101 |
], |
|
102 |
}, |
|
103 |
}, |
|
104 |
] |
|
105 |
||
106 |
WSGI_APPLICATION = 'remieplt.wsgi.application' |
|
107 |
||
108 |
||
109 |
# Database |
|
110 |
# https://docs.djangoproject.com/en/dev/ref/settings/#databases |
|
111 |
||
112 |
DATABASES = { |
|
113 |
'default': { |
|
114 |
'ENGINE': 'django.db.backends.sqlite3', |
|
115 |
'NAME': os.path.abspath(os.path.join(BASE_DIR, '..', '..', 'run', 'db.sqlite3')), |
|
116 |
} |
|
117 |
} |
|
118 |
||
119 |
||
120 |
# Internationalization |
|
121 |
# https://docs.djangoproject.com/en/dev/topics/i18n/ |
|
122 |
||
123 |
LANGUAGE_CODE = 'en-us' |
|
124 |
||
125 |
TIME_ZONE = 'UTC' |
|
126 |
||
127 |
USE_I18N = True |
|
128 |
||
129 |
USE_L10N = True |
|
130 |
||
131 |
USE_TZ = True |
|
132 |
||
133 |
ugettext = lambda s: s |
|
134 |
||
135 |
LANGUAGES = ( |
|
136 |
('fr', ugettext('French')), |
|
137 |
('en', ugettext('English')), |
|
138 |
('ja', ugettext('Japanese')), |
|
139 |
) |
|
140 |
||
141 |
SITE_ID = 1 |
|
142 |
||
143 |
# Static files (CSS, JavaScript, Images) |
|
144 |
# https://docs.djangoproject.com/en/dev/howto/static-files/ |
|
145 |
||
146 |
STATIC_URL = '/static/' |
|
147 |
||
148 |
||
149 |
AUTH_USER_MODEL = 'user.LdtUser' |
|
150 |
||
151 |
AUTHENTICATION_BACKENDS = ( |
|
152 |
# 'social.backends.open_id.OpenIdAuth', |
|
153 |
# 'social.backends.google.GoogleOpenId', |
|
154 |
# 'social.backends.twitter.TwitterOAuth', |
|
155 |
# 'social.backends.facebook.FacebookOAuth2', |
|
156 |
'guardian.backends.ObjectPermissionBackend', |
|
157 |
'django.contrib.auth.backends.ModelBackend', |
|
9
3166a35f5f0d
Added CAS Auth middleware and CAS Login urls to remie platform + removed authserver/homestead/.vagrant from repo
durandn
parents:
3
diff
changeset
|
158 |
'django_cas_ng.backends.CASBackend', |
3 | 159 |
) |
160 |
||
161 |
||
162 |
ADMINS = ( |
|
163 |
#('Your Name', 'your_email@domain.com'), |
|
164 |
) |
|
165 |
||
166 |
MANAGERS = ADMINS |
|
167 |
||
168 |
||
169 |
||
170 |
# Registration settings |
|
171 |
ACCOUNT_ACTIVATION_DAYS = 7 |
|
172 |
REGISTRATION_OPEN = False |
|
173 |
||
174 |
||
175 |
# ldt settings |
|
176 |
DECOUPAGE_BLACKLIST = ( |
|
177 |
"de_PPP", |
|
178 |
) |
|
179 |
||
180 |
ZIP_BLACKLIST = ( |
|
181 |
"__MACOSX", |
|
182 |
) |
|
183 |
||
184 |
LDT_MAX_SEARCH_NUMBER = 50 |
|
185 |
LDT_JSON_DEFAULT_INDENT = 2 |
|
186 |
LDT_MAX_FRAGMENT_PER_SEARCH = 3 |
|
187 |
LDT_RESULTS_PER_PAGE = 10 |
|
188 |
LDT_MAX_CONTENTS_PER_PAGE = 10 |
|
189 |
LDT_MAX_PROJECTS_PER_PAGE = 10 |
|
190 |
LDT_FRONT_MEDIA_PER_PAGE = 9 |
|
191 |
LDT_FRONT_PROJECTS_PER_PAGE = 12 |
|
192 |
LDT_MEDIA_IN_RESULTS_PAGE = 6 |
|
193 |
||
194 |
TEST_WEBSERVER_ADDRPORT = "127.0.0.1:8888" |
|
195 |
||
196 |
EMPTY_MEDIA_EXTERNALID = None |
|
197 |
||
198 |
||
199 |
SOCIAL_AUTH_COMPLETE_URL_NAME = 'complete' |
|
200 |
SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'associate_complete' |
|
201 |
||
202 |
AUTO_INDEX_AFTER_SAVE = True |
|
203 |
||
204 |
ANONYMOUS_USER_ID = -1 |
|
205 |
||
206 |
WEB_VERSION = remieplt.get_version() |
|
207 |
||
208 |
DIVISIONS_FOR_STAT_ANNOTATION = 64 |
|
209 |
||
210 |
FRONT_TAG_LIST = [] |
|
211 |
||
212 |
DEFAULT_CONTENT_ICON = "thumbnails/contents/content_default_icon.png" |
|
213 |
DEFAULT_PROJECT_ICON = "thumbnails/projects/project_default_icon.png" |
|
214 |
DEFAULT_USER_ICON = "thumbnails/users/user_default_icon.png" |
|
215 |
DEFAULT_GROUP_ICON = "thumbnails/groups/group_default_icon.png" |
|
216 |
PROFILE_IMG_MAX_SIZE = 1000000 |
|
217 |
||
218 |
USE_GROUP_PERMISSIONS = ['Project', 'Content', 'Media'] |
|
219 |
FORBIDDEN_STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path=" |
|
220 |
PUBLIC_GROUP_NAME = 'everyone' |
|
221 |
MAX_USERS_SEARCH = 20 |
|
222 |
||
223 |
SYNTAX = { |
|
224 |
'++' : 'OK', |
|
225 |
'--' : 'KO', |
|
226 |
'==' : 'REF', |
|
227 |
'??' : 'Q' |
|
228 |
} |
|
229 |
||
230 |
EXTERNAL_STREAM_SRC = ['youtube.com', 'dailymotion.com', 'vimeo.com'] |
|
231 |
||
232 |
HAYSTACK_CONNECTIONS = { |
|
233 |
'default': { |
|
234 |
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', |
|
235 |
}, |
|
236 |
} |
|
237 |
HAYSTACK_SIGNAL_PROCESSOR = 'ldt.indexation.signals.LdtSignalProcessor' |
|
238 |
LDT_INDEXATION_INSERT_BATCH_SIZE = 5000 |
|
239 |
||
240 |
||
241 |
#Cors headers for API |
|
242 |
CORS_ORIGIN_ALLOW_ALL = True |
|
243 |
||
244 |
||
245 |
MAX_TAG_LENGTH = 255 |
|
246 |
FORCE_LOWERCASE_TAGS = True |
|
247 |
||
248 |
TAGGIT_TAGCLOUD_MIN = 1.0 |
|
249 |
TAGGIT_TAGCLOUD_MAX = 12.0 |
|
250 |
||
251 |
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |