Skip to main content

Django application to rate objects & stars UI

Project description

Rating of content with stars UI

Usage

models.py:

from django.db import models
from djangoratings.fields import RatingField
from rating.models import RatingBase


class MyModel(models.Model, RatingBase):
    ...
    rating = RatingField(range=10, allow_anonymous=True, can_change_vote=True)
    rating_field_names = ('rating',)

settings.py:

RATINGS_VOTES_PER_IP = 3 # or whatever

urls.py:

(r'^stars/', include('rating.urls'))

template.html:

{% show_stars object "rating" 0 %}

Note

show_stars(context, obj, field_name=’rating’, big_star=True, disabled=False, extra_class=’‘, extra_success=’‘)

show_stars template tag displays clickable stars to vote for content.

License note

This application contains static files from:

Written by the development team of Arpaso company: http://arpaso.com

Project details


Release history Release notifications

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for stars-rating, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size stars-rating-0.1.tar.gz (27.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page