I am trying to work with authentication tutorials to make sure everything works as expected. I entered the following code.
>>> from django.contrib.auth.models import User >>> user = User.objects.create_user('john', ' lennon@thebeatles.com ', 'johnpassword') >>> user.last_name = 'Lennon' >>> user.save()
and I get an error
AppRegistryNotReady: Models aren't loaded yet.
I see from the release notes
The standard implementation of remove() for ForeignKey managers has changed from a series of calls to Model.save() to one QuerySet.update() call. The change means that pre_save and post_save signals arent sent more. You can use the keyword bulk=False argument to return to the previous behavior.
Therefore, I assume that this is a problem with a foreign key.
My question is: where can I use the attribute bulk=False or is there another solution?
source share