remove python 2 style codes

This commit is contained in:
Asif Saif Uddin 2021-10-17 15:38:55 +06:00
parent b74284fd10
commit 723f804d5f
2 changed files with 3 additions and 3 deletions

View file

@ -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())

View file

@ -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: