Hello everyone,

Again, I'm super new to django so please bare with me. 

I have just connected my mysql database to my django project in 
settings.py. I then manually made models for the tables in my database. I 
originally used inspectdb to do this, but I was getting a bunch of errors. 
I decided to just do it manually from there, although I'm not necessarily 
sure if it is correct yet. Do my models have to perfectly match my sql 
relations? My tables already have unique ids as a field. I now that django 
automatically does this, that is, make unique ids? Will this be a problem. 

Anyway, I then ran makemigrations and migrate (which worked wonderfully), 
and now I am trying to simply view some data from my database in the 
manage.py shell. I am not exactly sure how to do this, so any help would be 
great. Further, am I missing any steps as far connecting the mysql database 
to my django project? Lastly, a rather huge disconnect I am having with all 
of this is simply understanding how exactly the models.py in my apps are 
actually connected to my database?

Here are a few snapshots of my files:

Models.py 

   
<https://scontent.xx.fbcdn.net/v/t34.0-12/17909331_10208121547186599_508598864_n.png?oh=1c21c01e48b70f99479c3a915eaa1161&oe=58F6563E>
 

manage.py shell


<https://scontent.xx.fbcdn.net/v/t34.0-12/17909331_10208121547186599_508598864_n.png?oh=1c21c01e48b70f99479c3a915eaa1161&oe=58F6563E>

-- 
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/6f71bcb1-505b-462a-87f8-5a0402419b50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to