Skip to content

Commit

Permalink
fix(passwords): Merge clean location of login related templates (#10340)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik authored Jun 21, 2024
1 parent 4c11989 commit 9b05b10
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions dojo/user/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,26 @@
if settings.FORGOT_PASSWORD:
urlpatterns.extend([
re_path(r'^password_reset/$', views.DojoPasswordResetView.as_view(
template_name='dojo/password_reset.html',
template_name='login/password_reset.html',
), name="password_reset"),
re_path(r'^password_reset/done/$', auth_views.PasswordResetDoneView.as_view(
template_name='dojo/password_reset_done.html',
template_name='login/password_reset_done.html',
), name='password_reset_done'),
re_path(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,40})/$', auth_views.PasswordResetConfirmView.as_view(
template_name='dojo/password_reset_confirm.html',
template_name='login/password_reset_confirm.html',
), name='password_reset_confirm'),
re_path(r'^reset/done/$', auth_views.PasswordResetCompleteView.as_view(
template_name='dojo/password_reset_complete.html',
template_name='login/password_reset_complete.html',
), name='password_reset_complete'),
])

if settings.FORGOT_USERNAME:
urlpatterns.extend([
re_path(r'^forgot_username_done/$', auth_views.PasswordResetDoneView.as_view(
template_name='dojo/forgot_username_done.html',
template_name='login/forgot_username_done.html',
), name="forgot_username_done"),
re_path(r'^forgot_username/$', views.DojoForgotUsernameView.as_view(
template_name='dojo/forgot_username.html',
template_name='login/forgot_username.html',
success_url=reverse_lazy("forgot_username_done")
), name="forgot_username"),
])
Expand Down
6 changes: 3 additions & 3 deletions dojo/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ def send_mail(self, subject_template_name, email_template_name,
from_email = get_system_setting('email_from')

url = hyperlink.parse(settings.SITE_URL)
subject_template_name = 'dojo/forgot_username_subject.html'
email_template_name = 'notifications/mail/forgot_username.tpl'
subject_template_name = 'login/forgot_username_subject.html'
email_template_name = 'login/forgot_username.tpl'
context['site_name'] = url.host
context['protocol'] = url.scheme
context['domain'] = settings.SITE_URL[len(f'{url.scheme}://'):]
Expand All @@ -638,7 +638,7 @@ def send_mail(self, subject_template_name, email_template_name,
from_email = get_system_setting('email_from')

url = hyperlink.parse(settings.SITE_URL)
email_template_name = 'notifications/mail/forgot_password.tpl'
email_template_name = 'login/forgot_password.tpl'
context['site_name'] = url.host
context['protocol'] = url.scheme
context['domain'] = settings.SITE_URL[len(f'{url.scheme}://'):]
Expand Down

0 comments on commit 9b05b10

Please sign in to comment.