Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.contrib.auth import authenticate
- user = authenticate(username='john', password='secret')
- if user is not None:
- if user.is_active:
- print "You provided a correct username and password!"
- else:
- print "Your account has been disabled!"
- else:
- print "Your username and password were incorrect."
Add Comment
Please, Sign In to add comment