
On Apr 17, 2017 12:57 AM, alkha...@mymail.vcu.edu wrote:
>
> I am not exactly sure how to do this, so any help would be great.
The shell is just a Python REPL, you can run any Python code in it. Consider:
>>> from yourapp import models
>>> models.YourModel.objects.first()
<YourModel: YourModel object>
>Further, am I missing any steps as far connecting the mysql database to my django project?
If you can do the above successfully I don't think so.
>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?
Short answer: they're not really.
Long answer: When you try to access a field of a model in Django, Django will query the table related to that model, get the row with the ID of your model, then give you the correct column.