Opened 5 years ago
Closed 5 years ago
#31593 closed Cleanup/optimization (invalid)
Replace hardcoded path to PasswordChangeView in UserChangeForm with reverse of its URL
Reported by: | Denis | Owned by: | Denis |
---|---|---|---|
Component: | Forms | Version: | 3.0 |
Severity: | Normal | Keywords: | user, password, form, UserChangeForm |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
I'm using built-in forms for authentication.
Created CustomUser
with CustomUserCreationForm and CustomUserChangeForm.
CustomUserChangeForm is based on 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 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)
Change History (2)
comment:1 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
It's an admin's form: "A form used in the admin interface to change a user’s information and permissions"
And 'password/'
path works fine there
It's my first ticket and fix.
I have fixed it locally and it works fine:
Is it trivial or requires a patch?