diff --git a/django_starfield/templates/django_starfield/stars.html b/django_starfield/templates/django_starfield/stars.html index 664cdcf47782cf1e642b1e555ac15623bd73ff4c..d68168d93974c02a1d78bbd423089d007372e45b 100644 --- a/django_starfield/templates/django_starfield/stars.html +++ b/django_starfield/templates/django_starfield/stars.html @@ -1,10 +1,14 @@ {% load static %} -<div class="django-starfield"> +<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 %} /><!-- - --><label for="{{ widget.name }}-{{ forloop.counter0 }}" - style="content: '\{{ codepoint }}'">{{ i }}</label><!-- + --><label for="{{ widget.name }}-{{ forloop.counter0 }}">{{ i }}</label><!-- -->{% endfor %} </div> <link rel="stylesheet" href="{% static 'django_starfield.css' %}" /> +<style type="text/css"> + #django-starfield-{{ widget.name }} label { + content: '\{{ codepoint }}'; + } +</style>