1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-03-22 10:34:49 +00:00

black and isort lint.

This commit is contained in:
catborise 2020-11-04 15:54:50 +03:00
parent 77d031b04f
commit 7aaa018d2c
47 changed files with 1206 additions and 1063 deletions

View file

@ -1,6 +1,6 @@
from django import forms
from django.contrib.auth.models import Group, User
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.models import Group, User
from django.urls import reverse_lazy
from django.utils.text import format_lazy
from django.utils.translation import gettext_lazy as _
@ -76,10 +76,12 @@ class UserForm(forms.ModelForm):
if self.instance.id:
password = ReadOnlyPasswordHashField(
label=_("Password"),
help_text=format_lazy(_("""Raw passwords are not stored, so there is no way to see
this user's password, but you can change the password using <a href='{}'>this form</a>."""),
reverse_lazy('admin:user_update_password',
args=[self.instance.id,]))
help_text=format_lazy(
_("""Raw passwords are not stored, so there is no way to see this user's password,
but you can change the password using <a href='{}'>this form</a>."""),
reverse_lazy('admin:user_update_password',
args=[self.instance.id,])
)
)
self.fields['Password'] = password