diff --git a/django_starfield/templates/django_starfield/stars.html b/django_starfield/templates/django_starfield/stars.html index 7df4cd366cd0f27eaff93c1a14dc2059b7010a0f..7d5c63fc6c77147ab36768f87e6d4a4621cbc376 100644 --- a/django_starfield/templates/django_starfield/stars.html +++ b/django_starfield/templates/django_starfield/stars.html @@ -2,7 +2,7 @@ <div class="django-starfield" id="django-starfield-{{ widget.name }}"> {% for i in stars %} <input type="radio" name="{{ widget.name }}" id="{{ widget.name }}-{{ forloop.counter0 }}" - value="{{ i }}" {% if widget.value == i %}checked="checked"{% endif %} /> + value="{{ i }}" {% ifequal widget.value i|stringformat:'i' %}checked="checked"{% endifequal %} /> <label for="{{ widget.name }}-{{ forloop.counter0 }}"><span>{{ i }}</span></label> {% endfor %} </div>