Am a new Django User and am finding difficulties making a query to my database

2017-09-13 Thread Abdul-Waris Dawuda
Hello Everyone
 
Am new to Django and am currently facing a problem trying to import a class 
from my models.

i get this error when i try to do that from the Shell. I am using Visual 
Studio. i get this problem when i run my command to import;

>>> from app.models import Artist

Traceback (most recent call last):
  File "", line 1, in 
  File ".\app\models.py", line 8, in 
class Artist(models.Model):
  File 
"C:\Users\Abdul-Waris\source\repos\DjangoWebProject2\DjangoWebProject2\env\lib\site-packages\django\db\models\base.py",
 
line 110, in __new__
app_config = apps.get_containing_app_config(module)
  File 
"C:\Users\Abdul-Waris\source\repos\DjangoWebProject2\DjangoWebProject2\env\lib\site-packages\django\apps\registry.py",
 
line 247, in get_containing_app_config
self.check_apps_ready()
  File 
"C:\Users\Abdul-Waris\source\repos\DjangoWebProject2\DjangoWebProject2\env\lib\site-packages\django\apps\registry.py",
 
line 125, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7b86f648-798a-4cb5-8fb9-cf2a7db83dd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


I AM NOT ABLE TO IMPORT CLASSES FROM MY MODELS WHEN AM TRYING TO RUN A QUERY

2017-09-13 Thread Abdul-Waris Dawuda
When i run this command in the django shell when am trying to make query to 
my databse i get this problem. Kindly help me out:

>>>from app.models import Artist
Traceback (most recent call last):
  File "", line 1, in 
  File ".\app\models.py", line 8, in 
class Artist(models.Model):
  File 
"C:\Users\Abdul-Waris\source\repos\DjangoWebProject2\DjangoWebProject2\env\lib\site-packages\django\db\models\base.py",
 
line 110, in __new__
app_config = apps.get_containing_app_config(module)
  File 
"C:\Users\Abdul-Waris\source\repos\DjangoWebProject2\DjangoWebProject2\env\lib\site-packages\django\apps\registry.py",
 
line 247, in get_containing_app_config
self.check_apps_ready()
  File 
"C:\Users\Abdul-Waris\source\repos\DjangoWebProject2\DjangoWebProject2\env\lib\site-packages\django\apps\registry.py",
 
line 125, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8c958585-b868-45aa-98f1-26533aae5db8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.