When using nested tuples for the choices option on a model you get the
get_foo_display(). to get the readable version of the choice. However
I want to get at the name of the groups. for example in the docs:
MEDIA_CHOICES = (
    ('Audio', (
            ('vinyl', 'Vinyl'),
            ('cd', 'CD'),
        )
    ),
    ('Video', (
            ('vhs', 'VHS Tape'),
            ('dvd', 'DVD'),
        )
    ),
    ('unknown', 'Unknown'),
)

I more or less want to recreate this in a template. So there would be
a spot that displays "Audio", then all of the objects that have either
Vinyl or CD selected.

I've seen the REGOUP template tag, but this doesn't quite do what i
want.

is their a simple way to get at the names of named groups?

--

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=.


Reply via email to