| author | ymh <ymh.work@gmail.com> |
| Mon, 29 Jul 2024 23:18:55 +0200 | |
| changeset 131 | 2a18dfe8bfc0 |
| parent 130 | 5eeebcbdee22 |
| permissions | -rw-r--r-- |
|
129
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
# -*- coding: utf-8 -*- |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
import os, logging |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
import tralalere |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
from environs import Env |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
env = Env() |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
# Read .env into os.environ |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
env.read_env() |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
SITE_ID = 1 |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
#BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
BASE_DIR = '/code/tralalere/' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
BASE_URL = '/' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
WEB_URL = 'http://tralalere.iri-research.org' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
STREAM_SRC_PREFIX = "" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
BASE_STATIC_URL = BASE_URL + 'static/' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
BASE_STATIC_ROOT = "/static/" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
#STREAM_URL = "rtmp://media.iri.centrepompidou.fr/ddc_player/" |
|
130
5eeebcbdee22
use right version for lucene and make players work again
ymh <ymh.work@gmail.com>
parents:
129
diff
changeset
|
25 |
STREAM_URL = 'https://media.iri.centrepompidou.fr/' |
|
129
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
# Absolute path to the directory that holds media. |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
29 |
# Example: "/home/media/media.lawrence.com/" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
30 |
MEDIA_ROOT = BASE_STATIC_ROOT + "media/" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
31 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
33 |
STATIC_URL = BASE_STATIC_URL + 'site/' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
34 |
# Absolute path to the directory that static files (js, css, swf...) |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
35 |
# DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
36 |
STATIC_ROOT = BASE_STATIC_ROOT + "site/" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
37 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
38 |
# PATH to the ffmpeg executable, used to know automatically the media file duration |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
39 |
FFMPEG_PATH = "" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
40 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
41 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
42 |
# trailing slash if there is a path component (optional in other cases). |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
43 |
# Examples: "http://media.lawrence.com", "http://example.com/media/" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
44 |
MEDIA_URL = BASE_STATIC_URL + "media/" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
45 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
46 |
CONTENT_ROOT = MEDIA_ROOT + "/content/" |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
47 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
48 |
STREAM_PATH = CONTENT_ROOT |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
49 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
50 |
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
51 |
# trailing slash. |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
52 |
# Examples: "http://foo.com/media/", "/media/". |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
53 |
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
54 |
LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
55 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
56 |
#DATABASES = { |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
57 |
# 'default': { |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
58 |
# 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
59 |
# 'NAME': 'tralalere', # Or path to database file if using sqlite3. |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
60 |
# 'USER': 'iri', # Not used with sqlite3. |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
61 |
# 'PASSWORD': 'iri', # Not used with sqlite3. |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
62 |
# 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3. |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
63 |
# 'PORT': '5432', # Set to empty string for default. Not used with sqlite3. |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
64 |
# } |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
65 |
#} |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
66 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
67 |
DATABASES = { |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
68 |
'default': env.dj_db_url("DATABASE_URL"), |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
69 |
} |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
70 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
71 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
72 |
DEBUG = True |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
73 |
TEMPLATE_DEBUG = DEBUG |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
74 |
LOG_LEVEL = logging.DEBUG |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
75 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
76 |
#INDEX_PATH = os.path.abspath(BASE_DIR + "../index/") |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
77 |
INDEX_PATH = '/index/' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
78 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
79 |
ADMINS = ( |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
80 |
# ('Your Name', 'your_email@domain.com'), |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
81 |
) |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
82 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
83 |
MANAGERS = ADMINS |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
84 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
85 |
GOOGLE_ANALYTICS_CODE = '' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
86 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
87 |
#EMAIL_USE_TLS = True |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
88 |
#EMAIL_HOST = 'smtp.gmail.com' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
89 |
#EMAIL_HOST_USER = 'iri.ddc@gmail.com' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
90 |
#EMAIL_HOST_PASSWORD = '' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
91 |
#EMAIL_PORT = 587 |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
92 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
93 |
EMAIL_USE_TLS = True |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
94 |
EMAIL_HOST = '' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
95 |
EMAIL_HOST_USER = '' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
96 |
EMAIL_HOST_PASSWORD = '' |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
97 |
EMAIL_PORT = 0 |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
98 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
99 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
100 |
ACCOUNT_ACTIVATION_DAYS = 7 |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
101 |
REGISTRATION_OPEN = False |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
102 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
103 |
LDT_MAX_SEARCH_NUMBER = 50 |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
104 |
LDT_JSON_DEFAULT_INDENT = 2 |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
105 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
106 |
EMPTY_MEDIA_EXTERNALID = None |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
107 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
108 |
AUTO_INDEX_AFTER_SAVE = True |
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
109 |
|
|
f6b392c37e10
lucene 7.7.1 compiled but not compatible with ldt indexation
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
110 |
FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"] |
| 131 | 111 |
|
112 |
SECRET_KEY = env.str("DJANGO_SECRET") |