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
Source:stackexchange.com