|
95 | 95 | "tutorials_wizard": "https://openenergyplatform.github.io/academy/tutorials/99_other/wizard/", # noqa E501
|
96 | 96 | "tutorials_create_database_conform_data": "https://openenergyplatform.github.io/academy/tutorials/99_other/database_data/", # noqa E501
|
97 | 97 | "tutorials_oemetadata": "https://openenergyplatform.github.io/academy/tutorials/99_other/getting_started_with_OEMetadata/", # noqa E501
|
98 |
| - "readthedocs": "https://openenergyplatform.github.io/oeplatform/oeplatform-code/web-api/oedb-rest-api/", |
| 98 | + "readthedocs": "https://openenergyplatform.github.io/oeplatform/oeplatform-code/web-api/oedb-rest-api/", # noqa E501 |
99 | 99 | "mkdocs": "https://openenergyplatform.github.io/oeplatform/",
|
100 | 100 | "compendium": "https://openenergyplatform.github.io/organisation/",
|
101 | 101 | "tib_terminology_service": "https://terminology.tib.eu/ts/collections",
|
@@ -201,8 +201,11 @@ def external_urls_context_processor(request):
|
201 | 201 | # https://docs.djangoproject.com/en/1.8/howto/static-files/
|
202 | 202 |
|
203 | 203 | AUTH_USER_MODEL = "login.myuser"
|
204 |
| -LOGIN_URL = "/user/login" |
205 |
| -LOGIN_REDIRECT_URL = "/" |
| 204 | +# https://docs.djangoproject.com/en/dev/ref/settings/#login-url |
| 205 | +LOGIN_URL = "account_login" |
| 206 | +# https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url |
| 207 | +LOGIN_REDIRECT_URL = "login:redirect" |
| 208 | +# LOGIN_REDIRECT_URL = "/" |
206 | 209 |
|
207 | 210 | REST_FRAMEWORK = {
|
208 | 211 | "DEFAULT_AUTHENTICATION_CLASSES": (
|
@@ -241,3 +244,11 @@ def external_urls_context_processor(request):
|
241 | 244 | # ACCOUNT_EMAIL_REQUIRED = True
|
242 | 245 | # ACCOUNT_USERNAME_REQUIRED = False
|
243 | 246 | # ACCOUNT_AUTHENTICATION_METHOD = 'email'
|
| 247 | +ACCOUNT_ALLOW_REGISTRATION = True |
| 248 | + |
| 249 | + |
| 250 | +# axes login throttling |
| 251 | +AXES_ENABLED = True |
| 252 | +AXES_FAILURE_LIMIT = 5 # Number of allowed attempts |
| 253 | +AXES_COOLOFF_TIME = 1 # Lockout period in hours |
| 254 | +AXES_ONLY_USER_FAILURES = True # Only track failures per user |
0 commit comments