Skip to main content

# 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

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

Uploaded Source

File details

Details for the file django-mp-shop-comparison-2.0.tar.gz.

File metadata

File hashes

Hashes for django-mp-shop-comparison-2.0.tar.gz
Algorithm Hash digest
SHA256 70e52f726a7b4253fe82cf4c9b2c9116fd9d7d32d14a10ffeaab14ed24b125c8
MD5 40327fcb22b014930ce4247c4ea5dc83
BLAKE2b-256 5a7fd24fdc5f1d8cd7d54a126b3d89a6d915f3210a39d44fce45b3e066e6b7ed

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0 This release

1 file

1.1

1 file

1.0

1 file

Supported by

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