2013年4月25日

ajax接收django发送的json数据

摘要: 首先django要有写发送json数据的方法 1 import simplejson 2 3 def sendjson(request): 4 ''' 发送json数据 ''' 5 result = {'username': 'username', 'password': 'password'} 6 result = simplejson.dumps(result) 7 8 return HttpResponse(result) 9 10 def index(request):11 阅读全文

posted @ 2013-04-25 22:41 h3idan 阅读(522) 评论(0) 推荐(0) 编辑

导航