Skip to main content

Rated reviews for Django

Project description

Rated reviews application for Django

Build Status Documentation Status GitHub release PyPI release Python version GitHub issues Code quality Coverage GitHub license

Rated reviews is derived from Django “excontrib” Comments and can be used to attach reviews with rating to any model. The core difference from comments is that user can provide only one review per item. Rating is expressed by a number and by default visualized with stars. However, it can be changed to whatever you want. Rating grades are also configurable.

Optionally rating can be weighted. For instance, you can designate experts whose rating would be more valuable. Alternatively, add weight to reviews of real byers of sold product.

Documentation is published on Read the Docs.


  • Python 3.3+
  • Django 1.11+

Django Compatibility

  • Django 1.11+
  • Django 2.0+
  • Django 3.0+


Install django-rated-reviews using pip:

pip install django-rated-reviews

Add reviews to INSTALLED_APPS. Example:


Run migrate so that Django will create the review tables.

Add the reviews app’s URLs to your project’s

urlpatterns = [
    url(r'^reviews/', include('reviews.urls')),

Use the review template tags to embed reviews in your templates.


All configuration settings are optional.


The maximum length of the review comment field, in characters. Comments longer than this will be rejected. Defaults to 3000.


If False (default) reviews are not published until they are moderated in admin. If user modifies existing review it is considered unmoderated again.


The maximum review form timeout in seconds. The default value is 2 * 60 * 60 (2 hours).


Custom rating choices, each represented by one star (currently the maximum supported number is 10). Default choices are:

    ('1', _('Terrible')),
    ('2', _('Poor')),
    ('3', _('Average')),
    ('4', _('Very Good')),
    ('5', _('Excellent')),


If True (default) rating text (as specified by choices) is displayed next to rating stars.


If False review comment is checked against words in PROFANITIES_LIST. If it contains any of the words, review is rejected.


Review admin exposes a link to review on a web site. By default it is shown as ▶. It can be changed to any other symbol or text, e.g. if Font Awesome is attached to admin the following setting can be used: '<i class="fas fa-external-link-alt"></i>'.


Custom reviews app can be set that will define custom ReviewForm, Review model or rating weight system.


Custom rating weight definition

def get_review_user_weight(user, target):
    if user.has_perm('reviews.can_moderate'):
        return 50
    from .models import Product, Order
    if isinstance(target, Product):
        count = Order.objects.filter(,
        if count > 0:
            return 10
    return 1


Application code is derived from Django “excontrib” Comments.

Rating widget uses star-rating.js library by Paul Ryley.

Project details

Download files

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

Files for django-rated-reviews, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_rated_reviews-1.0.1-py2.py3-none-any.whl (52.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-rated-reviews-1.0.1.tar.gz (39.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page