django-shop-ajax

Software Screenshot:
django-shop-ajax
Software Details:
Version: 0.1.2
Upload Date: 20 Feb 15
Developer: Ales Kocjancic
Distribution Type: Freeware
Downloads: 2

Rating: 1.0/5 (Total Votes: 1)

django-shop-ajax is a Django app that adds some clever AJAX functions for Django SHOP.

Installation

- 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_fckprotectedatt=" onclick="SHOP.cart.addItem({{ product.id }})"" >Add to cart< /a >
...

Requirements:

  • Python
  • Django
  • django-shop
  • jQuery

Other Software of Developer Ales Kocjancic

Comments to django-shop-ajax

Comments not found
Add Comment
Turn on images!