author | durandn |
Wed, 16 Mar 2016 17:28:11 +0100 | |
changeset 193 | ee213a823b70 |
parent 82 | bf1c38268e25 |
permissions | -rw-r--r-- |
3 | 1 |
# -*- coding: utf-8 -*- |
2 |
from remieplt.settings import * |
|
3 |
import os, logging |
|
4 |
||
5 |
#TODO override |
|
6 |
DEBUG = True |
|
7 |
TEMPLATE_DEBUG = DEBUG |
|
8 |
||
9 |
||
10 |
BASE_URL = '%(base_url)s' |
|
11 |
WEB_URL = '%(web_url)s' |
|
12 |
||
13 |
PLATFORM_BASE_URL = WEB_URL + BASE_URL + 'remieplt/' |
|
14 |
||
15 |
STREAM_SRC_PREFIX = "" |
|
16 |
||
17 |
BASE_STATIC_URL = WEB_URL + BASE_URL + 'static/' |
|
18 |
BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../../web/static/").rstrip("/")+"/" |
|
19 |
||
20 |
STREAM_URL = BASE_STATIC_URL + "/content/" |
|
21 |
||
39
eaee50318e98
default value for CAS_URLPARAMETER_NAME in settings/__init__.py and in settings/dev.py.tmpl
durandn
parents:
16
diff
changeset
|
22 |
CAS_URLPARAMETER_NAME = "casticket" |
3 | 23 |
|
24 |
# Absolute path to the directory that holds media. |
|
25 |
# Example: "/home/media/media.lawrence.com/" |
|
26 |
MEDIA_ROOT = BASE_STATIC_ROOT + "media/" |
|
27 |
||
28 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
29 |
# trailing slash if there is a path component (optional in other cases). |
|
30 |
# Examples: "http://media.lawrence.com", "http://example.com/media/" |
|
31 |
MEDIA_URL = BASE_STATIC_URL + 'media/' |
|
32 |
||
33 |
||
34 |
STATIC_URL = BASE_STATIC_URL + 'site/' |
|
35 |
||
36 |
# Absolute path to the directory that static files (js, css, swf...) |
|
37 |
# DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder |
|
38 |
STATIC_ROOT = BASE_STATIC_ROOT + "site/" |
|
39 |
||
40 |
CONTENT_ROOT = MEDIA_ROOT + "/content/" |
|
41 |
||
42 |
STREAM_PATH = CONTENT_ROOT |
|
43 |
||
44 |
||
45 |
SRC_BASE_URL = BASE_URL + __name__.split('.')[0] + '/' |
|
46 |
||
47 |
LOGIN_URL = SRC_BASE_URL + 'accounts/login/' |
|
48 |
LOGOUT_URL = SRC_BASE_URL + 'accounts/disconnect/' |
|
49 |
LOGIN_REDIRECT_URL = SRC_BASE_URL + 'ldt/' |
|
50 |
LOGOUT_REDIRECT_URL = SRC_BASE_URL + 'accounts/login' |
|
51 |
PROFILE_REDIRECT_URL = SRC_BASE_URL + 'auth_accounts/create/profile' |
|
52 |
LOGIN_ERROR_URL = SRC_BASE_URL + 'accounts/login' |
|
53 |
||
54 |
||
16 | 55 |
CORS_URLS_REGEX = r"^" + BASE_URL + 'remie/api/.*$' |
3 | 56 |
|
57 |
||
58 |
# Make this unique, and don't share it with anybody. |
|
59 |
SECRET_KEY = '%(secret_key)s' |
|
60 |
||
61 |
# PATH to the ffmpeg executable, used to know automatically the media file duration |
|
62 |
FFMPEG_PATH = "" |
|
63 |
||
64 |
||
65 |
DATABASES = { |
|
66 |
'default': { |
|
67 |
'ENGINE': 'django.db.backends.%(db_engine)s', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
68 |
'NAME': '%(db_name)s', # Or path to database file if using sqlite3. |
|
69 |
'USER': '%(db_user)s', # Not used with sqlite3. |
|
70 |
'PASSWORD': '%(db_password)s', # Not used with sqlite3. |
|
71 |
'HOST': '%(db_host)s', # Set to empty string for localhost. Not used with sqlite3. |
|
72 |
'PORT': '%(db_port)d', # Set to empty string for default. Not used with sqlite3. |
|
73 |
}, |
|
74 |
} |
|
75 |
||
76 |
LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../run/log/log.txt")) |
|
77 |
LOG_LEVEL = logging.DEBUG |
|
78 |
||
79 |
LOGGING = { |
|
80 |
'version': 1, |
|
81 |
'disable_existing_loggers': False, |
|
82 |
'filters': { |
|
83 |
'require_debug_false': { |
|
84 |
'()': 'django.utils.log.RequireDebugFalse' |
|
85 |
} |
|
86 |
}, |
|
87 |
'formatters' : { |
|
88 |
'simple' : { |
|
89 |
'format': "%(asctime)s - %(levelname)s : %(message)s", |
|
90 |
}, |
|
91 |
'semi-verbose': { |
|
92 |
'format': '%(levelname)s %(asctime)s %(module)s %(message)s' |
|
93 |
}, |
|
94 |
}, |
|
95 |
'handlers': { |
|
96 |
'mail_admins': { |
|
97 |
'level': 'ERROR', |
|
98 |
'filters': ['require_debug_false'], |
|
99 |
'class': 'django.utils.log.AdminEmailHandler' |
|
100 |
}, |
|
101 |
'stream_to_console': { |
|
102 |
'level': LOG_LEVEL, |
|
103 |
'class': 'logging.StreamHandler' |
|
104 |
}, |
|
105 |
'file': { |
|
106 |
'level': LOG_LEVEL, |
|
107 |
'class': 'logging.FileHandler', |
|
108 |
'filename': LOG_FILE, |
|
109 |
'formatter': 'semi-verbose', |
|
110 |
}, |
|
111 |
}, |
|
112 |
'loggers': { |
|
113 |
# 'django.db.backends':{ |
|
114 |
# 'handlers': ['file'], |
|
115 |
# 'level': LOG_LEVEL, |
|
116 |
# 'propagate': True, |
|
117 |
# }, |
|
118 |
'django.request': { |
|
119 |
'handlers': ['file'], |
|
120 |
'level': LOG_LEVEL, |
|
121 |
'propagate': True, |
|
122 |
}, |
|
123 |
'ldt': { |
|
124 |
'handlers': ['file'], |
|
125 |
'level': LOG_LEVEL, |
|
126 |
'propagate': True, |
|
127 |
}, |
|
128 |
# 'pyelasticsearch': { |
|
129 |
# 'handlers': ['file'], |
|
130 |
# 'level': LOG_LEVEL, |
|
131 |
# 'propagate': True, |
|
132 |
# }, |
|
133 |
} |
|
134 |
} |
|
135 |
||
136 |
||
137 |
ADMINS = ( |
|
138 |
#('Your Name', 'your_email@domain.com'), |
|
139 |
) |
|
140 |
||
141 |
MANAGERS = ADMINS |
|
142 |
||
143 |
GOOGLE_ANALYTICS_CODE = None |
|
144 |
||
145 |
||
146 |
ACCOUNT_ACTIVATION_DAYS = 7 |
|
147 |
REGISTRATION_OPEN = False |
|
148 |
||
149 |
LDT_MAX_SEARCH_NUMBER = 50 |
|
150 |
LDT_JSON_DEFAULT_INDENT = 2 |
|
151 |
||
152 |
EMPTY_MEDIA_EXTERNALID = None |
|
153 |
||
154 |
FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"] |
|
155 |
||
156 |
HAYSTACK_CONNECTIONS = { |
|
157 |
'default': { |
|
158 |
'ENGINE': 'ldt.indexation.backends.elasticsearch_backend.ElasticsearchSearchEngine', |
|
159 |
'URL': 'http://127.0.0.1:9200/', |
|
160 |
'INDEX_NAME': 'ldt', |
|
161 |
}, |
|
162 |
} |
|
82
bf1c38268e25
Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
39
diff
changeset
|
163 |
|
bf1c38268e25
Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
39
diff
changeset
|
164 |
CAS_SERVER_URL = "" |
bf1c38268e25
Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
39
diff
changeset
|
165 |
CAS_IGNORE_REFERER = True |
bf1c38268e25
Updated Readmes + Updated tmp CAS config + Updated Laravel test with iframe + remove X-Frame django middleware from middlewares + removed local ssl certificate from repo
durandn
parents:
39
diff
changeset
|
166 |
CAS_REDIRECT_URL = "/" |
193
ee213a823b70
refactoring views + add p3p header if P3P_HEADER is set in settings
durandn
parents:
82
diff
changeset
|
167 |
|
ee213a823b70
refactoring views + add p3p header if P3P_HEADER is set in settings
durandn
parents:
82
diff
changeset
|
168 |
P3P_HEADER = 'CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"' |