[Answered ]-Django: Not allowing newly-created user to log in until he/she is approved by the admin?

2👍

After you perform value assignment for model objects’ attributes, you should call object.save(), as so:

user = User.objects.create_user(username=username, password=password)
user.is_active = False
user.save()

This will save the changes you’ve introduced to the object.

From Django docs

👤Bish

Leave a comment