Skip to content

Instantly share code, notes, and snippets.

@andrewpetrochenkov
Last active August 3, 2024 15:50
Show Gist options
  • Save andrewpetrochenkov/f62e8d087a56a4ddf2f980c6c5b212f4 to your computer and use it in GitHub Desktop.
Save andrewpetrochenkov/f62e8d087a56a4ddf2f980c6c5b212f4 to your computer and use it in GitHub Desktop.
Django set_password #django #password
from django.contrib.auth.models import User
user = User.objects.get(username="username")
user.set_password('password')
user.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment