Opened 7 years ago

Closed 7 years ago

#28976 closed Bug (invalid)

not possible to customize template_name anymore in password reset views

Reported by: Jesse Haka Owned by: Jesse Haka
Component: contrib.auth Version: 2.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I am trying to customize template_name to password_reset view. However, it does not seems possible anymore in django 2

path('password_reset/', contviews.PasswordResetView.as_view(), kwargs={'template_name': 'password_reset.html'}, name='password_reset'),

kwargs are not checked here https://github.com/django/django/blob/master/django/views/generic/base.py#L131-L141

Change History (4)

comment:1 by Jesse Haka, 7 years ago

Owner: changed from nobody to Jesse Haka
Status: newassigned

comment:3 by Jesse Haka, 7 years ago

actually it is possible to override that template using PasswordResetView.as_view(template_name='password_reset.html'). However, before django2 instruction were to override template_name in kwargs so I think we should follow how it was before?

comment:4 by Tim Graham, 7 years ago

Component: Template systemcontrib.auth
Resolution: invalid
Status: assignedclosed

Sorry that caused you some confusion, however, I don't see a good reason to allow two ways of doing the same -- that will likely be more confusing in the long run.

Note: See TracTickets for help on using tickets.
Back to Top