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.

Source Distribution

django-mp-shop-comparison-2.0.tar.gz (7.7 kB view hashes)

Uploaded Source

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