A Likert field for Django models
Project description
django-likert-field
A Likert field for Django models. Useful for adding ratings star functionality.
Installation
pip install django-likert-field
Basic usage
Use in the same manner as a regular model field:
# models.py from likert_field.models import LikertField class PetShopSurvey(models.Model): i_like_snakes = LikertField() # Renders in add.html # # jQuery star rating widget should be able to grab by 'likert-field' class # <label for="id_i_like_snakes">I like snakes:</label> <input id="id_i_like_snakes" type="text" name="i_like_snakes" class="likert-field" /> # detail.html # # assume 'survey' is context object holding instance # {% load likert_fa_stars %} {{ survey.i_like_snakes|fa_stars4|safe }} # Renders in detail.html # # assuming one-star Likert item score # <i class='fa fa-star likert-star'></i> ... other stars maybe...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-likert-field-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa4565b316a2eb5f123ae2da1d332b52e671b445bbebef15ca03bce74b08a5f1 |
|
MD5 | 454f1096e12ec8d0d138ec8c34db6278 |
|
BLAKE2b-256 | 84c5e260400ca451236718d81f6b873640bff69b0a633e441706b91d18db9542 |