Sorry, I forgot to actually *ask* the question. :)

I'm able to get a list of Sections related to 'Linux Magazine', for
example, with:

validsections = magazine.section_set.all()

This returns this list:
[<Section: Tutorial>, <Section: Sysadmin>]  # (so far I've created only
these 2 sections)

Is there a method to restrict the choices in the following line, like
this?:

section = models.ForeignKey(Section, choices=validsections)

I tried this, but got this error:
'ForeignKey' object has no attribute 'section_set'

Once again, thanks for any help.


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

Reply via email to