From 879cf07009c65a8adf37b690665c88d51a195121 Mon Sep 17 00:00:00 2001 From: Pablo Silva Date: Thu, 21 Nov 2024 16:58:53 +0000 Subject: [PATCH] Rename reset-password template folder --- .../users/{html => reset-password}/password_reset.jinja2 | 0 .../{html => reset-password}/password_reset_complete.jinja2 | 0 .../{html => reset-password}/password_reset_confirm.jinja2 | 0 .../{html => reset-password}/password_reset_email.html | 0 .../{html => reset-password}/password_reset_subject.txt | 0 src/users/urls.py | 4 ++-- src/users/views.py | 6 +++--- 7 files changed, 5 insertions(+), 5 deletions(-) rename src/users/jinja2/users/{html => reset-password}/password_reset.jinja2 (100%) rename src/users/jinja2/users/{html => reset-password}/password_reset_complete.jinja2 (100%) rename src/users/jinja2/users/{html => reset-password}/password_reset_confirm.jinja2 (100%) rename src/users/jinja2/users/{html => reset-password}/password_reset_email.html (100%) rename src/users/jinja2/users/{html => reset-password}/password_reset_subject.txt (100%) diff --git a/src/users/jinja2/users/html/password_reset.jinja2 b/src/users/jinja2/users/reset-password/password_reset.jinja2 similarity index 100% rename from src/users/jinja2/users/html/password_reset.jinja2 rename to src/users/jinja2/users/reset-password/password_reset.jinja2 diff --git a/src/users/jinja2/users/html/password_reset_complete.jinja2 b/src/users/jinja2/users/reset-password/password_reset_complete.jinja2 similarity index 100% rename from src/users/jinja2/users/html/password_reset_complete.jinja2 rename to src/users/jinja2/users/reset-password/password_reset_complete.jinja2 diff --git a/src/users/jinja2/users/html/password_reset_confirm.jinja2 b/src/users/jinja2/users/reset-password/password_reset_confirm.jinja2 similarity index 100% rename from src/users/jinja2/users/html/password_reset_confirm.jinja2 rename to src/users/jinja2/users/reset-password/password_reset_confirm.jinja2 diff --git a/src/users/jinja2/users/html/password_reset_email.html b/src/users/jinja2/users/reset-password/password_reset_email.html similarity index 100% rename from src/users/jinja2/users/html/password_reset_email.html rename to src/users/jinja2/users/reset-password/password_reset_email.html diff --git a/src/users/jinja2/users/html/password_reset_subject.txt b/src/users/jinja2/users/reset-password/password_reset_subject.txt similarity index 100% rename from src/users/jinja2/users/html/password_reset_subject.txt rename to src/users/jinja2/users/reset-password/password_reset_subject.txt diff --git a/src/users/urls.py b/src/users/urls.py index 99804ef9..b5ae643b 100644 --- a/src/users/urls.py +++ b/src/users/urls.py @@ -43,10 +43,10 @@ path("logout/", auth_views.LogoutView.as_view(), name="logout"), path('reset-password/', ResetPasswordView.as_view(), name='reset-password'), path('password-reset-confirm///', - auth_views.PasswordResetConfirmView.as_view(template_name='users/html/password_reset_confirm.jinja2'), + auth_views.PasswordResetConfirmView.as_view(template_name='users/reset-password/password_reset_confirm.jinja2'), name='password_reset_confirm'), path('password-reset-complete/', - auth_views.PasswordResetCompleteView.as_view(template_name='users/html/password_reset_complete.jinja2'), + auth_views.PasswordResetCompleteView.as_view(template_name='users/reset-password/password_reset_complete.jinja2'), name='password_reset_complete'), # path("recover/", recover_password, name="recover"), # path("recover-code/", recover_code, name="recover-code"), diff --git a/src/users/views.py b/src/users/views.py index 8ffba392..fae3ee20 100644 --- a/src/users/views.py +++ b/src/users/views.py @@ -75,9 +75,9 @@ def signup(request): class ResetPasswordView(SuccessMessageMixin, PasswordResetView): - template_name = 'users/html/password_reset.jinja2' - email_template_name = 'users/html/password_reset_email.html' - subject_template_name = 'users/html/password_reset_subject.txt' + template_name = 'users/reset-password/password_reset.jinja2' + email_template_name = 'users/reset-password/password_reset_email.html' + subject_template_name = 'users/reset-password/password_reset_subject.txt' success_message = _("We've emailed you instructions for setting your password, " \ "if an account exists with the email you entered. You should receive them shortly." \ " If you don't receive an email, " \