Skip to main content

Django shop comparison app

Project description

# MP-Shop | Comparison

### Installation:

1) Install using PIP: ` pip install django-mp-shop-comparison `

  1. Add ‘comparison’ to INSTALLED_APPS.
  2. Add ‘comparison.middleware.ComparisonMiddleware’ to MIDDLEWARE.
  3. Add path(‘comparison/’, include(‘comparison.urls’)) to urlpatterns.

### Public methods:

Products count: ` len(request.comparison) `

Add to comparison: ` request.comparison.add(product) `

Remove from comparison: ` request.comparison.remove(product_id) `

Clear comparison list: ` request.comparison.clear() `

Check is comparison list empty: ` request.comparison.is_empty() `

Get products from comparison: ` request.comparison.get_products(category_id) `

Check is product in comparison: ` request.comparison.has_product(product_id) `

Get categories of compare products ` request.comparison.get_categories() `

### Requirements: * django >= 2.0.6 * python >= 3.5.2

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-mp-shop-comparison, version 2.0
Filename, size File type Python version Upload date Hashes
Filename, size django-mp-shop-comparison-2.0.tar.gz (7.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page