author | cavaliet |
Tue, 14 May 2013 12:10:41 +0200 | |
changeset 95 | 989b403c7205 |
parent 59 | 4671c9fd69b5 |
child 105 | 665f520f23ae |
permissions | -rw-r--r-- |
0 | 1 |
# -*- coding: utf-8 -*- |
2 |
import os, logging |
|
3 |
||
4 |
SITE_ID = 1 |
|
5 |
||
1 | 6 |
#configuration for runserver |
7 |
#BASE_URL = '/' |
|
8 |
#PLATFORM_BASE_URL = '/' |
|
9 |
#WEB_URL = '' |
|
10 |
#WEB_AUTH = [] |
|
11 |
||
12 |
||
13 |
||
0 | 14 |
#BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/" |
15 |
BASE_DIR = '%(base_dir)s' |
|
16 |
BASE_URL = '%(base_url)s' |
|
1 | 17 |
PLATFORM_BASE_URL = BASE_URL + 'ldtplatform/' |
0 | 18 |
WEB_URL = '%(web_url)s' |
19 |
WEB_AUTH = [] # example [{'REGEX': 'localhost/~ymh/platform', 'NAME': 'ymh', 'PASSWORD': 'ymh'}] |
|
20 |
STATIC_URL = BASE_URL + 'static/site/' |
|
21 |
||
22 |
||
23 |
STREAM_URL = "%(stream_url)s" |
|
24 |
||
25 |
STREAM_SRC_PREFIX = "%(stream_src_prefix)s" |
|
26 |
|
|
27 |
BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/" |
|
28 |
BASE_STATIC_URL = BASE_URL + 'static/' |
|
29 |
||
30 |
# Absolute path to the directory that holds media. |
|
31 |
# Example: "/home/media/media.lawrence.com/" |
|
32 |
MEDIA_ROOT = BASE_STATIC_ROOT + "media/" |
|
33 |
||
34 |
||
35 |
# Absolute path to the directory that static files (js, css, swf...) |
|
36 |
# DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder |
|
37 |
STATIC_ROOT = BASE_STATIC_ROOT + "site/" |
|
38 |
||
59 | 39 |
# Make this unique, and don't share it with anybody. |
40 |
SECRET_KEY = '%(secret_key)s' |
|
41 |
||
0 | 42 |
# PATH to the ffmpeg executable, used to know automatically the media file duration |
43 |
FFMPEG_PATH = "%(ffmpeg_path)s" |
|
44 |
||
45 |
||
46 |
CONTENT_ROOT = BASE_STATIC_ROOT + "content/" |
|
47 |
||
48 |
# PATH where uploaded media are put. |
|
49 |
STREAM_PATH = CONTENT_ROOT |
|
50 |
||
51 |
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/' |
|
52 |
LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/' |
|
53 |
||
54 |
||
55 |
||
56 |
DATABASES = { |
|
57 |
'default': { |
|
58 |
'ENGINE': 'django.db.backends.%(db_engine)s', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
59 |
'NAME': '%(db_name)s', # Or path to database file if using sqlite3. |
|
60 |
'USER': '%(db_user)s', # Not used with sqlite3. |
|
61 |
'PASSWORD': '%(db_password)s', # Not used with sqlite3. |
|
62 |
'HOST': '%(db_host)s', # Set to empty string for localhost. Not used with sqlite3. |
|
63 |
'PORT': '%(db_port)d', # Set to empty string for default. Not used with sqlite3. |
|
64 |
} |
|
65 |
} |
|
66 |
||
67 |
CACHES = { |
|
68 |
'default': { |
|
69 |
'BACKEND': 'django.core.cache.backends.dummy.DummyCache', |
|
70 |
} |
|
71 |
} |
|
72 |
||
73 |
DEBUG = True |
|
74 |
TEMPLATE_DEBUG = DEBUG |
|
75 |
||
14 | 76 |
#LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../../run/log/log.txt")) |
0 | 77 |
LOG_FILE = '%(log_file)s' |
78 |
LOG_LEVEL = logging.DEBUG |
|
79 |
LOGGING = { |
|
80 |
'version': 1, |
|
81 |
'disable_existing_loggers': False, |
|
59 | 82 |
'filters': { |
83 |
'require_debug_false': { |
|
84 |
'()': 'django.utils.log.RequireDebugFalse' |
|
85 |
} |
|
86 |
}, |
|
0 | 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', |
|
59 | 98 |
'filters': ['require_debug_false'], |
0 | 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 |
} |
|
129 |
} |
|
130 |
||
131 |
||
132 |
ADMINS = ( |
|
133 |
# ('Your Name', 'your_email@domain.com'), |
|
134 |
) |
|
135 |
||
136 |
MANAGERS = ADMINS |
|
137 |
||
138 |
GOOGLE_ANALYTICS_CODE = '%(google_analytics_code)s' |
|
139 |
||
140 |
EMAIL_USE_TLS = %(email_use_tls)s |
|
141 |
EMAIL_HOST = '%(email_host)s' |
|
142 |
EMAIL_HOST_USER = '%(email_host_user)s' |
|
143 |
EMAIL_HOST_PASSWORD = '%(email_host_user)s' |
|
144 |
EMAIL_PORT = %(email_port)d |
|
145 |
||
146 |
ACCOUNT_ACTIVATION_DAYS = 7 |
|
147 |
REGISTRATION_OPEN = False |
|
148 |
||
149 |
LDT_MAX_SEARCH_NUMBER = 50 |
|
150 |
LDT_MAX_FRAGMENT_PER_SEARCH = 3 |
|
151 |
LDT_RESULTS_PER_PAGE = 1 |
|
152 |
LDT_JSON_DEFAULT_INDENT = 0 |
|
153 |
LDT_MAX_CONTENTS_PER_PAGE = 5 |
|
154 |
LDT_MAX_PROJECTS_PER_PAGE = 5 |
|
155 |
LDT_FRONT_MEDIA_PER_PAGE = 9 |
|
156 |
||
157 |
EMPTY_MEDIA_EXTERNALID = None |
|
158 |
||
159 |
AUTO_INDEX_AFTER_SAVE = True |
|
160 |
||
161 |
FORBIDDEN_STREAM_URL = "%(forbidden_stream_url)s" |
|
162 |
||
95
989b403c7205
Update conf templates, requirements and version number to 2.9.0
cavaliet
parents:
59
diff
changeset
|
163 |
AUDIO_RECORD_URL = "%(audio_record_url)s" |
989b403c7205
Update conf templates, requirements and version number to 2.9.0
cavaliet
parents:
59
diff
changeset
|
164 |
|
0 | 165 |
FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"] |
166 |
||
167 |
HAYSTACK_CONNECTIONS = { |
|
168 |
'default': { |
|
169 |
#for elasticsearch use ldt.indexation.backends.elasticsearch_backend.ElasticsearchSearchEngine |
|
170 |
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', |
|
171 |
#'URL': 'http://127.0.0.1:9200/', |
|
172 |
#'INDEX_NAME': 'ldt', |
|
173 |
}, |
|
174 |
} |
|
59 | 175 |
|
176 |
LDT_INDEXATION_INSERT_BATCH_SIZE = 5000 |