Hi,

title may be confusing, I explain myself.
Using Django, I recently put in place AJAX request handling in my
views.

Before, no problem :
- one adress typing on client side <-> one GET request on server side
- one click on Submit button on a form (client-side) <-> one POST
request on server side


After :
- one adress typing on client side <-> one GET request on server side
- one click on Submit button on a form (client-side) <-> one POST
request on server side
but
- one input modification (which calls $.getJSON, what I call AJAX
REQUEST) <-> one AJAX handling by my view (GET request on specific
url) and then 5 GET request on server side ...


Here is the code preparing my AJAX request on client side :
[...]
$.getJSON('',dict)
[...]

with dict something like :
dict['foo'] = 0

which results in calling : url?foo=0

And here is how I handle this on server side :
[...]
if request.GET.keys():
    return
HttpResponse(simplejson.dumps(AJAX_answer),mimetype='application/
javascript')
[...]

with AJAX_answer another dict to be read by javascript on client side.

Any clue concerning the origin of those 5 GET requests ?

Thanks !

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to