OK. I changed the code below to (note .items):

{% for key, value_list in my_dict.items %}
    {{ key }}
    {% for item in value_list %}
        {{ item }}
   {% endfor %}
{% endfor %}

Now I get the full key value but for each item (which again is a form
field) I get something like this rendered to the HTML:
<django.forms.fields.ChoiceField object at 0x2858950>

instead of a nicely rendered field.

Any ideas?

Thank you!

Keyton


On Jan 2, 12:06 am, Keyton Weissinger <key...@gmail.com> wrote:
> I'm passing a dictionary of values that look something like this:
>
> {'name1':[field1, field2, field3], 'name2':[field4, field5,field6]..}
>
> Each key is a simple string and each value is a list of form fields.
>
> I should be able to do something like this in the template to render
> same:
> {% for key, value_list in my_dict %}
>     {{ key }}
>     {% for item in value_list %}
>         {{ item }}
>     {% endfor %}
> {% endfor %}
>
> or similar.
>
> When I do this I get something weird. I only get the first letter of
> the key (so 'n' for my sample keys above) and for each item above
> (remember each item represents a form field and should just render as
> an HTML field/widget/etc) I get only the first letter of the label of
> the form field.
>
> I've tried it many different ways and I'm stymied.
>
> Has anyone seen anything like this?
>
> Thank you!
>
> Keyton
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to