﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31593	Replace hardcoded path to PasswordChangeView in UserChangeForm with reverse of its URL	Denis	Denis	"I'm using built-in forms for authentication.
Created {{{CustomUser}}} with [https://docs.djangoproject.com/en/3.0/topics/auth/customizing/#custom-users-and-the-built-in-auth-forms CustomUserCreationForm] and CustomUserChangeForm.
CustomUserChangeForm is based on [https://github.com/django/django/blob/stable/3.0.x/django/contrib/auth/forms.py#L141 UserChangeForm].

If password is get successfully {{{help_text}}} is supplied with {{{'../password/'}}} path:
{{{
help_text=_(...but you can change the password using <a href=""{}"">this form</a>.),
***
if password:
    password.help_text = password.help_text.format('../password/')
}}}

But aimed form has {{{password_change}}} URL in [https://github.com/django/django/blob/stable/3.0.x/django/contrib/auth/urls.py#L13 auth/urls.py]:
{{{
path('password_change/', views.PasswordChangeView.as_view(), name='password_change'),
}}}

And there is no easy way to substitute it (I mean it's a hardcoded string)"	Cleanup/optimization	closed	Forms	3.0	Normal	invalid	user, password, form, UserChangeForm		Unreviewed	0	0	0	0	1	0
