Fontawesome has a great star rating css extension, which looks really awesome.
However clicking on any of the span elements wouldn't really do anything. I don't know how to hook this up with my database model. Lets say I have an integer field of 0-5 in Django. How could I set the value according to the user's selection within the template?
<span class="rating">
<span class="star"></span>
<span class="star"></span>
<span class="star"></span>
<span class="star"></span>
<span class="star"></span>
</span>
This is the best plugin for star rating if you are using bootstrap:
class="rating"
to the inputGithub Project
You may check my Bootstrap JQuery Star rating plugin I created with various configurable options (demos for scenarios are included within). It uses CSS3 as much as possible, but also uses JQuery (if you are ok with that). You can get the star rating numbers OR set it easily through the plugin methods.
Uses Bootstrap 3.x glyphicons, includes RTL support, supports plugin events and methods. The plugin also supports any fractionally filled stars. You can refer the source here.
If you are keen on using Font-Awesome, you can override the plugin CSS to use Font-Awesome instead of Bootstrap Glyphicons in your project.
Have a look at django-ratings - that's what you're looking for.
I did not see a simple answer using only bootstrap glyphicons and jquery. I am sure other people have come here looking for a quick copy and paste so I just wrote one.
To set the default value from the DB using django template, for each star do: