Reputation: 6432
I am new at learning Django, I am using django-1.9.6. By default I was using python 2.7 and for this django app I have installed 3.4 and run the terminal typing
manage.py shell
When ever I tried to import something from my models in terminal , it throughs this error.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/farhad/PycharmProjects/website/music/models.py", line 7, in <module>
class Album(models.Model):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/db/models/base.py", line 94, in __new__
app_config = apps.get_containing_app_config(module)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/apps/registry.py", line 239, in get_containing_app_config
self.check_apps_ready()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/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.
Upvotes: 0
Views: 289
Reputation: 445
If you're just opening the Python shell, you won't have access to anything in Django. Try manage.py shell
to load the Django environment.
Upvotes: 1