#2684: Backwards relations (ie. xxx_set) across different apps needs voodoo
magic
to work
------------------------------+---------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Type: defect | Status: new
Priority: normal | Milestone:
Component: Core framework | Version:
Severity: normal | Keywords:
------------------------------+---------------------------------------------
As described (and temporarily solved) here:
http://groups.google.com/group/django-
users/browse_frm/thread/8b1f9699dd5c72d1/2663f422db6a027c?lnk=arm#2663f422db6a027c
In general, I have a Photo model and an Article model. They live in
separate applications. The Article model has:
picture = models.ForeignKey(Photo)
The problem is that you can't access the 'article_set' attribute from a
Photo instance *unless* you've already imported 'Article'.
Russell says that this is reasonably obvious if you know the internals,
but it's definitely not documented.
So this should be properly documented, and if anyone can figure out how, a
fix should be put in so you don't need to import the 'Article' model just
to be able to access 'article_set' on a Photo instance.
--
Ticket URL: <http://code.djangoproject.com/ticket/2684>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---