3๐
I just updated a project from 1.7 to 1.8 and ran into this issue.
I was replacing old 'auth.User'
and django.contrib.auth.models.User
references and stumbled upon the following error:
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
Reading through the traceback I found out that I did the following in my models.py
:
models.signals.post_save.connect(create_user_profile, sender=get_user_model())
This is the second time I got that issue, so the following might be a solution to others. Simply replace the get_user_model
function with a string or setting:
models.signals.post_save.connect(create_user_profile, sender=settings.AUTH_USER_MODEL)
๐คTobias Lorenz
Source:stackexchange.com