I have a form, on that form is a ModelChoiceField named MediumFormat.
It points to a MediumFormat table in my database which acts as an
entity relationship between a Medium table and a Format table.

I need to display a single radio button collection, that is, it is
being driven by a single Form field.  But I need to group the radios
based on the medium they represent.  This is basically just a visual
thing, I need more than one unordered list encapsulating different
items in the field based on their relationship.

I've been looking into writing a custom widget, but it would be nice
to just do this as a one-off in the template for now.  Is there any
way to gain access to the queryset for a form field from the
template?  For example:

{{ form.mediumFormat.queryset.medium.id }}

I tried that approach but it renders blank.

My other option is a custom widget, but I don't think the widget has
direct access to the queryset either, just a choices list.
--~--~---------~--~----~------------~-------~--~----~
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