Hi, yes I did a reset. I dropped all tables and recreated them, still I get the same error. All functions well when I do just like the tutorial: I call an object from a class without a foreign key and then I use the function object_set.create, which is supposed to create and link to an object from the other class with a foreign key.
When I try to use the same function between classes which both have foreign keys, it doesn't work out. It seems like the foreign key connection can only go one way. I can't find any confirmation of this neither in the documentation nor in the forum. If anyone can confirm that it is in fact possible or not, it would be helpful. Thanks. On Dec 28, 7:50 am, Empty <[EMAIL PROTECTED]> wrote: > On Dec 27, 2007 5:22 PM, Robert <[EMAIL PROTECTED]> wrote: > > > > > Hi, Sorry about the misunderstanding. > > > I am supposed to get this message when I try to add a new object: > > <Choice: Not much> > > > However, after having added a foreign key in the poll class I receive > > this error instead: > > > "Poll has no attribute choice" > > > Why? > > Did you do a reset? It sounds like you added the foreignkey after the > fact and things are out of sync. A poll object should have a > choice_set. > > Michael Trier > blog.michaeltrier.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---