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 , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
comment:3 by , 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 , 7 years ago
Component: | Template system → contrib.auth |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
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.
https://github.com/django/django/pull/9515