Reporting back on this one.  I solved the problem, but perhaps there's
a more elegant way of writing this.

1) Discovered that I was not in fact comparing like data types, so {%
ifequal %} was bound to fail.  (Pardon my newb-ness)

2) Once I fixed that problem, I ended up putting six ifequals together
in the loop, so that the radio button would be checked if any one of
the six possible selections in the "selections" list was equal:

...
<input type="radio" name="group{{ object.group_code|upper }}"
id="id_group{{ object.group_code|upper }}" value="{{ object.id }}"
validate="required:true"
                                 {% ifequal object.id selections.groupA %} 
checked {% endifequal
%}
                                 {% ifequal object.id selections.groupB %} 
checked {% endifequal
%}
                                 {% ifequal object.id selections.groupC %} 
checked {% endifequal
%}
                                 {% ifequal object.id selections.groupD %} 
checked {% endifequal
%}
                                 {% ifequal object.id selections.groupE %} 
checked {% endifequal
%}
                                 {% ifequal object.id selections.groupF %} 
checked {% endifequal
%}  />
...


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

Reply via email to