Skip to content Skip to sidebar Skip to footer

Django "models Aren't Loaded Yet"

It's been quite a while since I've dealt with django, I'm dealing with some code that may be a bit older, now on Django 1.7. What is this stacktrace about? It occurs not via runse

Solution 1:

Before using your app's models in Command line -

import django
django.setup()

Solution 2:

Include the below code in your wsgi file and check.

from django.core.wsgi importget_wsgi_applicationapplication= get_wsgi_application()

Post a Comment for "Django "models Aren't Loaded Yet""