|
@@ -7,7 +7,7 @@ For more information on this file, see
|
7
|
7
|
https://docs.djangoproject.com/en/5.1/topics/settings/
|
8
|
8
|
|
9
|
9
|
For the full list of settings and their values, see
|
10
|
|
-https://docs.djangoproject.com/en/3.0/ref/settings/
|
|
10
|
+https://docs.djangoproject.com/en/5.1/ref/settings/
|
11
|
11
|
"""
|
12
|
12
|
|
13
|
13
|
from pathlib import Path
|
|
@@ -24,7 +24,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
24
|
24
|
|
25
|
25
|
|
26
|
26
|
# Quick-start development settings - unsuitable for production
|
27
|
|
-# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
|
|
27
|
+# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
28
|
28
|
|
29
|
29
|
|
30
|
30
|
# Application definition
|
|
@@ -41,6 +41,7 @@ INSTALLED_APPS = [
|
41
|
41
|
'django.contrib.sessions',
|
42
|
42
|
'django.contrib.messages',
|
43
|
43
|
'django.contrib.staticfiles',
|
|
44
|
+ #
|
44
|
45
|
'simple_history',
|
45
|
46
|
]
|
46
|
47
|
|
|
@@ -180,6 +181,20 @@ USER_CONFIG_DEFAULTS = {
|
180
|
181
|
'DEFAULT_THEME': 'clear-green',
|
181
|
182
|
'ALLOWED_HOSTS': ['127.0.0.1', 'localhost', ],
|
182
|
183
|
'CSRF_TRUSTED_ORIGINS': [],
|
|
184
|
+ 'ADMINS': [],
|
|
185
|
+ 'PASSWORD_RESET_TIMEOUT': 60*60*3,
|
|
186
|
+ #
|
|
187
|
+ 'EMAIL_HOST': None,
|
|
188
|
+ 'EMAIL_PORT': None,
|
|
189
|
+ 'EMAIL_HOST_USER': None,
|
|
190
|
+ 'EMAIL_FROM': "piki",
|
|
191
|
+ 'EMAIL_HOST_PASSWORD': None,
|
|
192
|
+ 'EMAIL_USE_TLS': None,
|
|
193
|
+ 'EMAIL_USE_SSL': None,
|
|
194
|
+ 'EMAIL_TIMEOUT': None,
|
|
195
|
+ 'EMAIL_SSL_KEYFILE': None,
|
|
196
|
+ 'EMAIL_SSL_CERTFILE': None,
|
|
197
|
+
|
183
|
198
|
}
|
184
|
199
|
|
185
|
200
|
# Set configuration parameters
|
|
@@ -188,9 +203,12 @@ thismodule = sys.modules[__name__]
|
188
|
203
|
for property_name in USER_CONFIG_DEFAULTS:
|
189
|
204
|
try:
|
190
|
205
|
value = getattr(config, property_name)
|
|
206
|
+ setattr(thismodule, property_name, value)
|
191
|
207
|
except AttributeError:
|
192
|
|
- value = USER_CONFIG_DEFAULTS[property_name]
|
193
|
|
- setattr(thismodule, property_name, value)
|
|
208
|
+ if not property_name.startswith('EMAIL_') or property_name == 'EMAIL_FROM':
|
|
209
|
+ value = USER_CONFIG_DEFAULTS[property_name]
|
|
210
|
+ setattr(thismodule, property_name, value)
|
|
211
|
+
|
194
|
212
|
|
195
|
213
|
# SECURITY WARNING: keep the secret key used in production secret!
|
196
|
214
|
#
|