diff options
Diffstat (limited to 'docs/topics/auth')
| -rw-r--r-- | docs/topics/auth/customizing.txt | 2 | ||||
| -rw-r--r-- | docs/topics/auth/passwords.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index c4fd73cebc..b3c3335a73 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -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() diff --git a/docs/topics/auth/passwords.txt b/docs/topics/auth/passwords.txt index 128a2906cb..9cf868ca21 100644 --- a/docs/topics/auth/passwords.txt +++ b/docs/topics/auth/passwords.txt @@ -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) |
