|
@@ -141,6 +141,8 @@ PAGES_ROOT = os.path.join(BASE_DIR, 'data', 'pages')
|
141
|
141
|
|
142
|
142
|
WHOOSH_PATH = os.path.join(BASE_DIR, 'data', 'whoosh')
|
143
|
143
|
|
|
144
|
+LOGIN_URL = 'users-login'
|
|
145
|
+
|
144
|
146
|
# Default primary key field type
|
145
|
147
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
146
|
148
|
|
|
@@ -162,6 +164,18 @@ USER_CONFIG_DEFAULTS = {
|
162
|
164
|
'DEFAULT_THEME': 'clear-blue',
|
163
|
165
|
'ALLOWED_HOSTS': ['127.0.0.1', 'localhost', ],
|
164
|
166
|
'CSRF_TRUSTED_ORIGINS': [],
|
|
167
|
+ 'ADMINS': [],
|
|
168
|
+ #
|
|
169
|
+ 'EMAIL_HOST': None,
|
|
170
|
+ 'EMAIL_PORT': None,
|
|
171
|
+ 'EMAIL_HOST_USER': None,
|
|
172
|
+ 'EMAIL_FROM': "piki",
|
|
173
|
+ 'EMAIL_HOST_PASSWORD': None,
|
|
174
|
+ 'EMAIL_USE_TLS': None,
|
|
175
|
+ 'EMAIL_USE_SSL': None,
|
|
176
|
+ 'EMAIL_TIMEOUT': None,
|
|
177
|
+ 'EMAIL_SSL_KEYFILE': None,
|
|
178
|
+ 'EMAIL_SSL_CERTFILE': None,
|
165
|
179
|
}
|
166
|
180
|
|
167
|
181
|
# Set configuration parameters
|
|
@@ -170,9 +184,12 @@ thismodule = sys.modules[__name__]
|
170
|
184
|
for property_name in USER_CONFIG_DEFAULTS:
|
171
|
185
|
try:
|
172
|
186
|
value = getattr(config, property_name)
|
|
187
|
+ setattr(thismodule, property_name, value)
|
173
|
188
|
except AttributeError:
|
174
|
|
- value = USER_CONFIG_DEFAULTS[property_name]
|
175
|
|
- setattr(thismodule, property_name, value)
|
|
189
|
+ if not property_name.startswith('EMAIL_') or property_name == 'EMAIL_FROM':
|
|
190
|
+ value = USER_CONFIG_DEFAULTS[property_name]
|
|
191
|
+ setattr(thismodule, property_name, value)
|
|
192
|
+
|
176
|
193
|
|
177
|
194
|
# SECURITY WARNING: keep the secret key used in production secret!
|
178
|
195
|
#
|