mirror of
https://github.com/django/django.git
synced 2025-06-03 18:49:12 +00:00
Fixed #28100 -- Removed link in UserChangeForm.password's translatable help_text
This commit is contained in:
parent
3e91850dcc
commit
c52ae33a0c
@ -118,7 +118,7 @@ class UserChangeForm(forms.ModelForm):
|
|||||||
help_text=_(
|
help_text=_(
|
||||||
"Raw passwords are not stored, so there is no way to see this "
|
"Raw passwords are not stored, so there is no way to see this "
|
||||||
"user's password, but you can change the password using "
|
"user's password, but you can change the password using "
|
||||||
"<a href=\"../password/\">this form</a>."
|
"<a href=\"{}\">this form</a>."
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -129,6 +129,7 @@ class UserChangeForm(forms.ModelForm):
|
|||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
self.fields['password'].help_text = self.fields['password'].help_text.format('../password/')
|
||||||
f = self.fields.get('user_permissions')
|
f = self.fields.get('user_permissions')
|
||||||
if f is not None:
|
if f is not None:
|
||||||
f.queryset = f.queryset.select_related('content_type')
|
f.queryset = f.queryset.select_related('content_type')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user