I upgraded from Django 1.8
to 1.9
but facing this problem
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
None of the other solutions on stackoverflow worked.
I already tried other solution like adding
import django
django.setup()
but no success.
File "/home/adithya/git/django_proj/manage.py", line 7, in <module>
from django.contrib.sites.models import Site
File "/home/adithya/git/virtualenv/env/local/lib/python2.7/site-packages/django/contrib/sites/models.py", line 83, in <module>
class Site(models.Model):
File "/home/adithya/git/virtualenv/env/local/lib/python2.7/site-packages/django/db/models/base.py", line 94, in __new__
app_config = apps.get_containing_app_config(module)
File "/home/adithya/git/virtualenv/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 239, in get_containing_app_config
self.check_apps_ready()
File "/home/adithya/git/virtualenv/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 124, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.