2010/9/18 bruno desthuilliers <bruno.desthuilli...@gmail.com>

>
> On 18 sep, 08:26, Axel Bock <mr.axel.b...@gmail.com> wrote:
> > Now I get an error when compiling this.
>
> s/compiling/importing/
>

yah, all right :) .



> > Any help here? I'm quite new to dango, so a little hint would be
> > nice :)
>
> Django automatically build the "reverse" relationship from SideLists
> (which should be renamed "Side" IMHO) to Meal, using the default
>

can I prevent this? I read up on this - again - and it seems I then have the
following construct:

    meal.side1.meal_set() == meal     # correct?

That really makes no sense in that area. all that the sides are is a
"over-complex" choice box. I actually would like to use a simple choice box,
_but_ the sides can change and so I just want to add a database row, and not
change code.



> To make a long story short, you need to explicitely specifies the
> related accessor name using the "related_name" argument in the
> ForeignKey constructor as werefr0g suggested.
>

tried that, and it seems to work :)


thanks a lot!
Axel.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to