Re: Mysql/Models

2017-04-18 Thread Camilo Torres
Hi, You can use a Meta class for your models and add a db_table property to control the table name related to the model, that way, you can name your model as you like (and differently from the DB table name). You can also use the db_column parameter to Fields to control the name of the column i

Re: Mysql/Models

2017-04-16 Thread m712 - Developer
On Apr 17, 2017 12:57 AM, alkhair...@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() >Further, am I missing

Mysql/Models

2017-04-16 Thread alkhairohr
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