diff --git a/src/paperless/settings.py b/src/paperless/settings.py index e21de21ca..046d2e603 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -355,6 +355,7 @@ ROOT_URLCONF = "paperless.urls" FORCE_SCRIPT_NAME = os.getenv("PAPERLESS_FORCE_SCRIPT_NAME") BASE_URL = (FORCE_SCRIPT_NAME or "") + "/" LOGIN_URL = BASE_URL + "accounts/login/" +LOGIN_REDIRECT_URL = "/dashboard" LOGOUT_REDIRECT_URL = os.getenv("PAPERLESS_LOGOUT_REDIRECT_URL") WSGI_APPLICATION = "paperless.wsgi.application" diff --git a/src/paperless/templates/account/login.html b/src/paperless/templates/account/login.html index 22e1ff53b..65bd3a27f 100644 --- a/src/paperless/templates/account/login.html +++ b/src/paperless/templates/account/login.html @@ -68,7 +68,7 @@ {% if EMAIL_ENABLED %}
- {% translate "Forgot your password?" %} + {% translate "Forgot your password?" %}
{% endif %} diff --git a/src/documents/templates/registration/password_reset_form.html b/src/paperless/templates/account/password_reset.html similarity index 96% rename from src/documents/templates/registration/password_reset_form.html rename to src/paperless/templates/account/password_reset.html index 9bdc22943..1b5de5aeb 100644 --- a/src/documents/templates/registration/password_reset_form.html +++ b/src/paperless/templates/account/password_reset.html @@ -2,6 +2,7 @@ {% load static %} {% load i18n %} +{% load allauth %} @@ -18,7 +19,8 @@ -
+ {% url 'account_reset_password' as reset_url %} + {% csrf_token %}

- +
diff --git a/src/documents/templates/registration/password_reset_done.html b/src/paperless/templates/account/password_reset_done.html similarity index 100% rename from src/documents/templates/registration/password_reset_done.html rename to src/paperless/templates/account/password_reset_done.html diff --git a/src/documents/templates/registration/password_reset_confirm.html b/src/paperless/templates/account/password_reset_from_key.html similarity index 92% rename from src/documents/templates/registration/password_reset_confirm.html rename to src/paperless/templates/account/password_reset_from_key.html index 8f24212a7..11b40cd22 100644 --- a/src/documents/templates/registration/password_reset_confirm.html +++ b/src/paperless/templates/account/password_reset_from_key.html @@ -2,6 +2,7 @@ {% load static %} {% load i18n %} +{% load allauth %} @@ -38,7 +39,10 @@ - {% if validlink %} + {% if token_fail %} + {% url 'account_reset_password' as passwd_reset_url %} +

The password reset link was invalid, possibly because it has already been used. Please {% translate "request a new password reset" %}.

+ {% else %}

{% translate "Set a new password." %}

{% if form.errors %}