a = User.objects.create_user('user1', 'user1@example.com')
b = User.objects.create_user('user2', 'user2@example.com', password='secret')
a.has_usable_password()
Checking if a Django user has a password set