Re: ajax cart

2011-05-09 Thread nederhoed
Hi Pasha, 1. Try using a dict instead of a list: data = { 'items': [{'id':'2','quant':3},{'id':4','quant':1}] } 2. could you provide the relevant part of the view? I expect something like: from django.http import HttpResponse from django.utils import simplejson def update_cart(request):

Re: ajax cart

2011-05-09 Thread Oleg Lomaka
you your answer object is 'data', for example, then data[0].id data[0].quant On Mon, May 9, 2011 at 1:56 PM, Паша Тявин wrote: > Hello. I'm newbie and trying to make a simple shopping cart using anonymous > session under ajax control. > I have a special url "/update_cart/" for only post request

ajax cart

2011-05-09 Thread Паша Тявин
Hello. I'm newbie and trying to make a simple shopping cart using anonymous session under ajax control. I have a special url "/update_cart/" for only post request from the the page "/product/" and I made a dictionary "request.session['cart']" with a text like [{'id':'2','quant':3},{'id':4','quan