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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file django-product-review-0.0.2.tar.gz.

File metadata

  • Download URL: django-product-review-0.0.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for django-product-review-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1428c24224e230c560253756c411dff8738e3924fde707738a93cf8e5c4c8b40
MD5 de50f2c1dca0d81664aa9a689c99732f
BLAKE2b-256 20a666dc487b7b0fd4f6139bf44f4fd6658077542833c9d3b8a97038d4975ba0

See more details on using hashes here.

File details

Details for the file django_product_review-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_product_review-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 79e0d5c160ae1864a06a20341fff3a880963d660d54894cc4480afe472e8f300
MD5 139f020faaf2656e05a3588522b4bfc4
BLAKE2b-256 f4e2af86267d5dd256b48d7735a2f9ec58eba67d5d7b0a051a0059d64be1de5e

See more details on using hashes here.

Supported by

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