http://stackoverflow.com/questions/5304517/ajax-post-in-django-framework
http://api.jquery.com/jquery.ajax/
ajaxtest.html
|
views.py
def ajaxtest(request): if request.is_ajax(): data = "You click " + request.GET['click'] + " button" import json return HttpResponse(json.dumps({'message':data}), 'application/json') return render(request, 'myapp/ajaxtest.html') |
댓글 없음:
댓글 쓰기