Last active
October 13, 2021 19:12
-
-
Save andrewp-as-is/f62e8d087a56a4ddf2f980c6c5b212f4 to your computer and use it in GitHub Desktop.
Django set_password #django
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
try: | |
user = User.objects.get(username="username") | |
user.set_password('password') | |
user.save() | |
except DoesNotExist: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment