I am trying to overrride the "admin/includes/fieldset.html" template. I am rendering "Group", a ModelMultipleChoiceField field as a CheckboxSelectMultiple widget. However I want to change the display depending on the choices selected.
{% if field.is_checkbox %}
{{ field.field }}{{ field.label_tag }}
{% else %}
{% ifequal field.field.field.label "Group" %}
{{ field.label_tag }}
{% for value in field.field.field.queryset.values %}
{{value}}<p/>
{% endfor%}
{% else %}
{{ field.label_tag }}{{ field.field }}
{% endifequal %}
{% endif %}
Is there a way to know which choices are selected and which are not. Right now what I am getting is all the available values and I am not able to distinguish which are selected.