Petey
unread,Sep 10, 2011, 3:49:50 PM9/10/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
In my model I use: choices=CATEGORY_CHOICES property.
CATEGORY_CHOICES = (
('hw', "Hardware"),
('soft', "Software"),
('snd', 'Audio'),
)
In templatetags it looks like this:
{%for c in category %}
{{ c.category|title}}
<br>
{%endfor%}
It always generates ''hw', 'soft' etc instead of Hardware, Software. I have no clue how to access "full-name" for my choices.
2. My second problem is that I dont really understand how I can generate multi-level lists.
{{ c.category }}
- {{ c.subcategory }}
Could someone explain how the loops should look like?
/// Petey