Refs #23919 -- Replaced super(ClassName, self) with super() in docs.

This commit is contained in:
chillaranand 2017-01-22 12:27:14 +05:30 committed by Tim Graham
parent 2d96c027f5
commit dc165ec8e5
36 changed files with 103 additions and 104 deletions

View file

@ -1111,7 +1111,7 @@ code would be required in the app's ``admin.py`` file::
def save(self, commit=True):
# Save the provided password in hashed format
user = super(UserCreationForm, self).save(commit=False)
user = super().save(commit=False)
user.set_password(self.cleaned_data["password1"])
if commit:
user.save()

View file

@ -292,7 +292,7 @@ First, we'll add the custom hasher:
algorithm = 'pbkdf2_wrapped_sha1'
def encode_sha1_hash(self, sha1_hash, salt, iterations=None):
return super(PBKDF2WrappedSHA1PasswordHasher, self).encode(sha1_hash, salt, iterations)
return super().encode(sha1_hash, salt, iterations)
def encode(self, password, salt, iterations=None):
_, _, sha1_hash = SHA1PasswordHasher().encode(password, salt).split('$', 2)