mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-17 06:30:25 +00:00
remove python 2 style codes
This commit is contained in:
parent
b74284fd10
commit
723f804d5f
2 changed files with 3 additions and 3 deletions
|
|
@ -56,7 +56,7 @@ class Admin2UserCreationForm(UserCreationForm):
|
|||
class Admin2UserChangeForm(UserChangeForm):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(Admin2UserChangeForm, self).__init__(*args, **kwargs)
|
||||
super().__init__(*args, **kwargs)
|
||||
print(self.fields['password'].help_text)
|
||||
self.fields['password'].help_text = _("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=\"%s\">this form</a>." % self.get_update_password_url())
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ def model_permission(permission):
|
|||
return has_permission
|
||||
|
||||
|
||||
class BasePermission(object):
|
||||
class BasePermission:
|
||||
'''
|
||||
Provides a base class with a common API. It implements a compatible
|
||||
interface to django-rest-framework permission backends.
|
||||
|
|
@ -187,7 +187,7 @@ class ModelDeletePermission(BasePermission):
|
|||
permissions = (model_permission('{app_label}.delete_{model_name}'),)
|
||||
|
||||
|
||||
class TemplatePermissionChecker(object):
|
||||
class TemplatePermissionChecker:
|
||||
'''
|
||||
Can be used in the template like:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue