Django upgrading to 1.9 error "AppRegistryNotReady: Apps aren't loaded yet." Django upgrading to 1.9 error "AppRegistryNotReady: Apps aren't loaded yet." django django

Django upgrading to 1.9 error "AppRegistryNotReady: Apps aren't loaded yet."


Try to add this lines to the top of your settings file:

import djangodjango.setup()

And if this will not help you try to remove third-party applications from your installed apps list one-by-one.


I'd a custom function written on one of my models __init__.py file. It was causing the error. When I moved this function from __init__.py it worked.


My problem was that I tried to import a Django model before calling django.setup()

This worked for me:

import djangodjango.setup()from myapp.models import MyModel

The above script is in the project root folder.