Skip to content
Snippets Groups Projects
Select Git revision
  • c0c7f2085633ef4847927a1496f464e74e0d53d3
  • master default protected
  • renovate/configure
  • 1.0.post2
  • 1.0.post1
  • 1.0
6 results

django-starfield

  • Clone with SSH
  • Clone with HTTPS
  • Forked from Nik | Klampfradler / django-starfield
    37 commits behind the upstream repository.
    Dominik George's avatar
    c0c7f208
    History
    Name Last commit Last update
    django_starfield
    .gitignore
    README.rst

    Django stars widget

    Description

    This is a simple widget rendering so-called rating stars as input for an integer field. It is based solely on CSS 3, as laid out by Martin Ivanov.

    Usage

    Just add the Stars widget to any IntegerField in a Django form.

    from django import forms
    from django_starfield import Stars
    
    class StarsExampleForm(forms.Form):
        rating = forms.IntegerField(widget=Stars())

    You can change the number of stars by passing the stars argument to the Stars widget.

    Differences

    This is different from other star rating applications in that it provides only a widget returning its selction to any IntegerField. It is not a complete rating application, just a presentational widget for integer input. It is also different in that it depends only on CSS3, without any JavaScript.