On Wednesday 01 March 2006 21:54, Paul Smith wrote:

>       ...to work the same way. Does this shortcut only work because the
> ManyToManyField was added to the article model, and not the author
> model, or am I doing something wrong? My authors and articles are in
> different apps.

IIRC, you have to do author.get_[article_app]_article_list().  This is 
because for this end of the relationship, Django has to work out a name 
to give it (for the other end it just uses the name of the attribute, 
'author').  You can override it using 'related_name' on the 
ManyToManyField.

Luke

-- 
"Smoking cures weight problems...eventually..." (Steven Wright)

Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to