|
1 # -*- coding: utf-8 -*- |
|
2 import os, logging |
|
3 |
|
4 SITE_ID = 1 |
|
5 |
|
6 #BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/" |
|
7 BASE_DIR = '%(base_dir)s' |
|
8 BASE_URL = '%(base_url)s' |
|
9 WEB_URL = '%(web_url)s' |
|
10 STATIC_URL = BASE_URL + 'static/site/' |
|
11 |
|
12 |
|
13 STREAM_URL = "%(stream_url)s" |
|
14 |
|
15 STREAM_SRC_PREFIX = "%(stream_src_prefix)s" |
|
16 |
|
17 BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/" |
|
18 BASE_STATIC_URL = BASE_URL + 'static/' |
|
19 |
|
20 # Absolute path to the directory that holds media. |
|
21 # Example: "/home/media/media.lawrence.com/" |
|
22 MEDIA_ROOT = BASE_STATIC_ROOT + "media/" |
|
23 |
|
24 |
|
25 # Absolute path to the directory that static files (js, css, swf...) |
|
26 # DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder |
|
27 STATIC_ROOT = BASE_STATIC_ROOT + "site/" |
|
28 |
|
29 # PATH to the ffmpeg executable, used to know automatically the media file duration |
|
30 FFMPEG_PATH = "%(ffmpeg_path)s" |
|
31 |
|
32 |
|
33 CONTENT_ROOT = BASE_STATIC_ROOT + "content/" |
|
34 |
|
35 # PATH where uploaded media are put. |
|
36 STREAM_PATH = CONTENT_ROOT |
|
37 |
|
38 ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/' |
|
39 LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/' |
|
40 |
|
41 |
|
42 |
|
43 DATABASES = { |
|
44 'default': { |
|
45 'ENGINE': 'django.db.backends.%(db_engine)s', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
46 'NAME': '%(db_name)s', # Or path to database file if using sqlite3. |
|
47 'USER': '%(db_user)s', # Not used with sqlite3. |
|
48 'PASSWORD': '%(db_password)s', # Not used with sqlite3. |
|
49 'HOST': '%(db_host)s', # Set to empty string for localhost. Not used with sqlite3. |
|
50 'PORT': '%(db_port)d', # Set to empty string for default. Not used with sqlite3. |
|
51 } |
|
52 } |
|
53 |
|
54 CACHES = { |
|
55 'default': { |
|
56 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', |
|
57 } |
|
58 } |
|
59 |
|
60 DEBUG = True |
|
61 TEMPLATE_DEBUG = DEBUG |
|
62 |
|
63 #LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt")) |
|
64 LOG_FILE = '%(log_file)s' |
|
65 LOG_LEVEL = logging.DEBUG |
|
66 logging.basicConfig(filename=LOG_FILE, level=LOG_LEVEL) |
|
67 |
|
68 |
|
69 ADMINS = ( |
|
70 # ('Your Name', 'your_email@domain.com'), |
|
71 ) |
|
72 |
|
73 MANAGERS = ADMINS |
|
74 |
|
75 GOOGLE_ANALYTICS_CODE = '%(google_analytics_code)s' |
|
76 |
|
77 EMAIL_USE_TLS = %(email_use_tls)s |
|
78 EMAIL_HOST = '%(email_host)s' |
|
79 EMAIL_HOST_USER = '%(email_host_user)s' |
|
80 EMAIL_HOST_PASSWORD = '%(email_host_user)s' |
|
81 EMAIL_PORT = %(email_port)d |
|
82 |
|
83 ACCOUNT_ACTIVATION_DAYS = 7 |
|
84 REGISTRATION_OPEN = False |
|
85 |
|
86 LDT_MAX_SEARCH_NUMBER = 50 |
|
87 LDT_MAX_FRAGMENT_PER_SEARCH = 3 |
|
88 LDT_RESULTS_PER_PAGE = 1 |
|
89 LDT_JSON_DEFAULT_INDENT = 0 |
|
90 LDT_MAX_CONTENTS_PER_PAGE = 5 |
|
91 LDT_MAX_PROJECTS_PER_PAGE = 5 |
|
92 LDT_FRONT_MEDIA_PER_PAGE = 9 |
|
93 |
|
94 EMPTY_MEDIA_EXTERNALID = None |
|
95 |
|
96 AUTO_INDEX_AFTER_SAVE = True |
|
97 |
|
98 FORBIDDEN_STREAM_URL = "%(forbidden_stream_url)s" |
|
99 |
|
100 FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"] |
|
101 |
|
102 HAYSTACK_CONNECTIONS = { |
|
103 'default': { |
|
104 #for elasticsearch use ldt.indexation.backends.elasticsearch_backend.ElasticsearchSearchEngine |
|
105 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', |
|
106 #'URL': 'http://127.0.0.1:9200/', |
|
107 #'INDEX_NAME': 'ldt', |
|
108 }, |
|
109 } |