I have a simple loop which sets up a series of radio-buttons.
"objgroup" is
obtained through a DB query/filter:
{% for obj in objgroup %}
<P><INPUT TYPE=RADIO NAME="selected" VALUE={{ obj.id }}
{% ifequal seek_id obj.id %} CHECKED {% endifequal %} >
showing other things... </P>
{% endfor %}
However the operation never indicates the desired default condition.
If I force an exception, I can see that the "seek_id" that I pass into
the
template has been forced into a list (as happens to everything).
Attributes
of objects, of course, don't get list-ified, so I speculate that this
is why
the comparison never succeeds even when the interior values would
appear to match. i.e.: [n] != n The obvious seek_id[0] fails, as
does
referring to it as {{seek_id}} within the {% ifequal...%}.
I'd appreciate it if someone could show me how this might be
accomplished.
Pointing to the right place in a Fine Manual would be great. Or, if
it isn't reasonably possible...
TIA!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---