I have a problem with my first django app and I can not find the solution. I send this to my controller:
http://localhost:8000/fun1_get_data/?param1_qty=10
The controller:
@never_cache
def func1_get_data(request):
result = request.GET['param1_qty']
return HttpResponse(json.dumps(result), content_type = "application/json")
Only return the same parameter...very easy...but doesn't work.Only works the first time after restart de server or 'save changes' on archive .py.
The first time OK:
http://localhost:8000/fun1_get_data/?param1_qty=10
10
And then....
http://localhost:8000/fun1_get_data/?param1_qty=999
10
panic!!
Extra: the template:
url(r'^func1_get_data/', controlador.func1_get_data)