Db not being populated for foreignkey

2008-03-09 Thread DuncanM
I was trying to create some models similar to that of the basic example "Polls" application. Except instead of Polls and Choice, it would be Menu and MenuItem. I have the following in my models: from django.db import models # -- # Menu Class # -- class Menu(models.Model): nam

Re: Db not being populated for foreignkey

2008-03-09 Thread Nick Fishman
DuncanM wrote: > I checked my DB and for somereason the MenuItem's are not being saved > when I save a menu?? > > Also my get_absolute_url method on Menu only returns ".../Menu/" > rather then ".../Menu/id" > > Could someone please show me what I'm doing wrong? > > Thanks, > Duncan > This might

Re: Db not being populated for foreignkey

2008-03-09 Thread DuncanM
Yeah, I've done that, I actually created the models at the same time so they were all created at once. On Mar 9, 1:35 pm, Nick Fishman <[EMAIL PROTECTED]> wrote: > DuncanM wrote: > > I checked my DB and for somereason the MenuItem's are not being saved > > when I save a menu?? > > > Also my get_a

Re: Db not being populated for foreignkey

2008-03-09 Thread DuncanM
Just to clear up if its not obvious already. In the admin section when I add a new Menu, I get the MenuItems shown below to add, just when I click the save button it does not save them to the DB, but it does save the menu created. --~--~-~--~~~---~--~~ You received