Skip to main content

Django review app

Project description

django-product-review

Django-review is a Django app that helps add and display reviews.

Quick start

  1. Install the needed packages

     ``pip install django-product-review django_htmx mptt``
    
  2. Add "review" to your INSTALLED_APPS setting like this

     INSTALLED_APPS = [
         ...
         'review',
         'django_htmx',
         'widget_tweaks',
     ]
    

    AND

     MIDDLEWARE = [
         ...
         'django_htmx.middleware.HtmxMiddleware',
     ]
    
  3. REVIEW_PRODUCT_MODEL

    Specify the model to apply review e.g

     REVIEW_PRODUCT_MODEL="inventory.Product"
    
  4. Include the review URLconf in your project urls.py like this

     path('review/', include("review.urls", namespace="review")),
    
  5. In your product detail view, pass the product to the template as product.

  6. Add {% load django_review %} to the top of your product detail template

  7. In the product detail template add

     <div id="django-review">
       {% reviews product %}
     </div>
    

    to the your desired position for review

  8. Run python manage.py migrate to create the review models.

  9. Visit a product detail to add a review.

Project details


Download files

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

Source Distribution

django-product-review-0.0.2.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

django_product_review-0.0.2-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page