This app adds some nifty ajax functions you can use with django SHOP.
Installation
This requires jQuery (http://jquery.com/) and django SHOP to work (https://github.com/divio/django-shop)
Add shop_ajax to your INSTALLED_APPS in your settings.py
On your server run python manage.py collectstatic to collect all app’s static files
Alternatively, you can just copy the content of shop.js in your javascript files.
Usage
Import the javascript files
<script type="text/javascript" src="{{ STATIC_URL }}shop_ajax/shop.js"></script>
Initialize the SHOP.cart somewhere on the top of your javascript code by providing it a csrf_token and urls to corresponding views
SHOP.cart.init('{{ csrf_token }}', '{% url cart_item_add %}', '{% url cart_item_add %}', '{% url cart_delete %}');
Use the provided functions in your templates
<a href="#" onclick="SHOP.cart.addItem({{ product.id }})">Add to cart</a>
...
Metadata
Release files for django-shop-ajax 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-shop-ajax-0.1.3.tar.gz | 2.3 kB | Without provenance | Details |
Release files / django-shop-ajax-0.1.3.tar.gz
| Download URL | django-shop-ajax-0.1.3.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8437e6a5c7a4012ac3684bad9e1e6d735ecbf27079978de933a898dd71a8343c
|
|
BLAKE2b-256 checksum How to use checksums |
a1e107d1991c93c44a1e6a42a1c8581554361408aff6062621becf9d415bf6b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-shop-ajax 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.