| author | ymh <ymh.work@gmail.com> |
| Fri, 31 Aug 2012 15:50:15 +0200 | |
| changeset 769 | a49769a3088d |
| parent 740 | d03908cf3c73 |
| child 858 | dcf47b385ddd |
| permissions | -rw-r--r-- |
|
444
2711eef17092
Update front tag list management with settings/config.
cavaliet
parents:
333
diff
changeset
|
1 |
# -*- coding: utf-8 -*- |
| 0 | 2 |
import os, logging |
3 |
||
4 |
SITE_ID = 1 |
|
5 |
||
|
769
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
6 |
#BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/" |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
7 |
BASE_DIR = '%(base_dir)s' |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
8 |
BASE_URL = '%(base_url)s' |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
9 |
WEB_URL = '%(web_url)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
|
10 |
STATIC_URL = BASE_URL + 'static/site/' |
|
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
|
11 |
|
|
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
|
12 |
|
|
769
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
13 |
STREAM_URL = "%(stream_url)s" |
| 0 | 14 |
|
|
769
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
15 |
STREAM_SRC_PREFIX = "%(stream_src_prefix)s" |
| 0 | 16 |
|
|
112
9886ab183b09
add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents:
109
diff
changeset
|
17 |
BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/" |
| 142 | 18 |
BASE_STATIC_URL = BASE_URL + 'static/' |
| 0 | 19 |
|
20 |
# Absolute path to the directory that holds media. |
|
21 |
# Example: "/home/media/media.lawrence.com/" |
|
|
112
9886ab183b09
add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents:
109
diff
changeset
|
22 |
MEDIA_ROOT = BASE_STATIC_ROOT + "media/" |
| 0 | 23 |
|
24 |
||
|
104
b62a2a3e272d
Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents:
103
diff
changeset
|
25 |
# Absolute path to the directory that static files (js, css, swf...) |
|
b62a2a3e272d
Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents:
103
diff
changeset
|
26 |
# DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder |
|
112
9886ab183b09
add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents:
109
diff
changeset
|
27 |
STATIC_ROOT = BASE_STATIC_ROOT + "site/" |
|
104
b62a2a3e272d
Use django.contrib.staticfiles to manage static file. Reorganize static files in ldt folder.
cavaliet
parents:
103
diff
changeset
|
28 |
|
|
122
f3a013f66974
Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents:
112
diff
changeset
|
29 |
# PATH to the ffmpeg executable, used to know automatically the media file duration |
|
769
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
30 |
FFMPEG_PATH = "%(ffmpeg_path)s" |
|
122
f3a013f66974
Add search form, displaying the results in a regular LDT template. Update language files.
cavaliet
parents:
112
diff
changeset
|
31 |
|
| 0 | 32 |
|
|
112
9886ab183b09
add permalink + corrcetion config with static and media path. update urls
ymh <ymh.work@gmail.com>
parents:
109
diff
changeset
|
33 |
CONTENT_ROOT = BASE_STATIC_ROOT + "content/" |
| 0 | 34 |
|
|
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
|
35 |
# PATH where uploaded media are put. |
| 0 | 36 |
STREAM_PATH = CONTENT_ROOT |
37 |
||
| 142 | 38 |
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/' |
39 |
LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/' |
|
40 |
||
41 |
||
| 0 | 42 |
|
43 |
DATABASES = { |
|
44 |
'default': { |
|
|
769
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
45 |
'ENGINE': 'django.db.backends.%(db_engine)s', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
46 |
'NAME': '%(db_name)s', # Or path to database file if using sqlite3. |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
47 |
'USER': '%(db_user)s', # Not used with sqlite3. |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
48 |
'PASSWORD': '%(db_password)s', # Not used with sqlite3. |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
49 |
'HOST': '%(db_host)s', # Set to empty string for localhost. Not used with sqlite3. |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
50 |
'PORT': '%(db_port)d', # Set to empty string for default. Not used with sqlite3. |
| 0 | 51 |
} |
52 |
} |
|
53 |
||
| 279 | 54 |
CACHES = { |
55 |
'default': { |
|
| 283 | 56 |
'BACKEND': 'django.core.cache.backends.dummy.DummyCache', |
| 279 | 57 |
} |
58 |
} |
|
59 |
||
| 0 | 60 |
DEBUG = True |
61 |
TEMPLATE_DEBUG = DEBUG |
|
62 |
||
|
769
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
63 |
#LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt")) |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
64 |
LOG_FILE = '%(log_file)s' |
| 0 | 65 |
LOG_LEVEL = logging.DEBUG |
|
196
b939a58d13b0
Moved code to add annotation to ldt_utils + added tests
verrierj
parents:
177
diff
changeset
|
66 |
logging.basicConfig(filename=LOG_FILE, level=LOG_LEVEL) |
| 0 | 67 |
|
68 |
||
69 |
ADMINS = ( |
|
70 |
# ('Your Name', 'your_email@domain.com'), |
|
71 |
) |
|
72 |
||
73 |
MANAGERS = ADMINS |
|
74 |
||
|
769
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
75 |
GOOGLE_ANALYTICS_CODE = '%(google_analytics_code)s' |
|
589
e7410c4df032
template cleaning, translation in js, and add generic google analytics
ymh <ymh.work@gmail.com>
parents:
538
diff
changeset
|
76 |
|
|
769
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
77 |
EMAIL_USE_TLS = %(email_use_tls)s |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
78 |
EMAIL_HOST = '%(email_host)s' |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
79 |
EMAIL_HOST_USER = '%(email_host_user)s' |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
80 |
EMAIL_HOST_PASSWORD = '%(email_host_user)s' |
|
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
81 |
EMAIL_PORT = %(email_port)d |
| 0 | 82 |
|
83 |
ACCOUNT_ACTIVATION_DAYS = 7 |
|
84 |
REGISTRATION_OPEN = False |
|
85 |
||
86 |
LDT_MAX_SEARCH_NUMBER = 50 |
|
| 176 | 87 |
LDT_MAX_FRAGMENT_PER_SEARCH = 3 |
| 177 | 88 |
LDT_RESULTS_PER_PAGE = 1 |
| 29 | 89 |
LDT_JSON_DEFAULT_INDENT = 0 |
|
644
94429061bbfa
First step of pagination for contents and projet in workspace home.
cavaliet
parents:
594
diff
changeset
|
90 |
LDT_MAX_CONTENTS_PER_PAGE = 5 |
|
94429061bbfa
First step of pagination for contents and projet in workspace home.
cavaliet
parents:
594
diff
changeset
|
91 |
LDT_MAX_PROJECTS_PER_PAGE = 5 |
| 740 | 92 |
LDT_FRONT_MEDIA_PER_PAGE = 9 |
| 0 | 93 |
|
94 |
EMPTY_MEDIA_EXTERNALID = None |
|
|
103
5578dcb54f4d
merge context_processors.py and enable upload cancel and remove temp file. Creation of a session temp folder for upload.
cavaliet
parents:
29
diff
changeset
|
95 |
|
|
5578dcb54f4d
merge context_processors.py and enable upload cancel and remove temp file. Creation of a session temp folder for upload.
cavaliet
parents:
29
diff
changeset
|
96 |
AUTO_INDEX_AFTER_SAVE = True |
|
243
3cff86180fbe
Replaced calls to objects by calls to safe_objects in views + xml can be changed on the fly to hide a content
verrierj
parents:
196
diff
changeset
|
97 |
|
|
769
a49769a3088d
clean config file and do some correction in the sync script.
ymh <ymh.work@gmail.com>
parents:
740
diff
changeset
|
98 |
FORBIDDEN_STREAM_URL = "%(forbidden_stream_url)s" |
|
444
2711eef17092
Update front tag list management with settings/config.
cavaliet
parents:
333
diff
changeset
|
99 |
|
|
2711eef17092
Update front tag list management with settings/config.
cavaliet
parents:
333
diff
changeset
|
100 |
FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"] |
| 504 | 101 |
|
|
718
5e27a39d3742
replace lucene by haystack, remove references to lucene
ymh <ymh.work@gmail.com>
parents:
644
diff
changeset
|
102 |
HAYSTACK_CONNECTIONS = { |
|
5e27a39d3742
replace lucene by haystack, remove references to lucene
ymh <ymh.work@gmail.com>
parents:
644
diff
changeset
|
103 |
'default': { |
| 719 | 104 |
#for elasticsearch use ldt.indexation.backends.elasticsearch_backend.ElasticsearchSearchEngine |
|
718
5e27a39d3742
replace lucene by haystack, remove references to lucene
ymh <ymh.work@gmail.com>
parents:
644
diff
changeset
|
105 |
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', |
| 722 | 106 |
#'URL': 'http://127.0.0.1:9200/', |
107 |
#'INDEX_NAME': 'ldt', |
|
|
718
5e27a39d3742
replace lucene by haystack, remove references to lucene
ymh <ymh.work@gmail.com>
parents:
644
diff
changeset
|
108 |
}, |
|
5e27a39d3742
replace lucene by haystack, remove references to lucene
ymh <ymh.work@gmail.com>
parents:
644
diff
changeset
|
109 |
} |