from django.contrib.auth.models import User def some_view(request): u = User.objects.get(username='john') u.set_password('new password') u.save()
ref :-https://docs.djangoproject.com/en/1.5/topics/auth/default/#changing-passwords
from django.contrib.auth.models import User def some_view(request): u = User.objects.get(username='john') u.set_password('new password') u.save()
ref :-https://docs.djangoproject.com/en/1.5/topics/auth/default/#changing-passwords