Re: inspectdb and foreign keys

2008-04-03 Thread mthorley
Thanks so much Karen, that is exactly what I needed! On Apr 2, 10:29 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, Apr 3, 2008 at 12:05 AM, [EMAIL PROTECTED] < > > [EMAIL PROTECTED]> wrote: > > > In your database ( not in the model ) rename the field 'category in > > table MdlCourse to

Re: inspectdb and foreign keys

2008-04-02 Thread Karen Tracey
On Thu, Apr 3, 2008 at 12:05 AM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > In your database ( not in the model ) rename the field 'category in > table MdlCourse to category_id and it should fix the problem... > normally a ForeignKey field name in the database is ClassName_id > Or, if you

Re: inspectdb and foreign keys

2008-04-02 Thread [EMAIL PROTECTED]
In your database ( not in the model ) rename the field 'category in table MdlCourse to category_id and it should fix the problem... normally a ForeignKey field name in the database is ClassName_id On Apr 2, 6:12 pm, mthorley <[EMAIL PROTECTED]> wrote: > Greetings, I used inspectdb to create my mo

inspectdb and foreign keys

2008-04-02 Thread mthorley
Greetings, I used inspectdb to create my models and then tried editing the generated models in order to define the ForeignKey relationships, and I'm getting an error. Here's what I have. Note: I commented out the original category field and tried adding my own ForeignKey class MdlCourseCategorie