Accept the json request.

14 views
Skip to first unread message

11751...@qq.com

unread,
Apr 27, 2016, 6:22:42 AM4/27/16
to Django users
I was wondering if there is any method to the handle the json request in an easy and simple way.
For examle ( in flask ):
names = request.json['names']
But in django, I will use: 
import json
text
= request.read()
names
=json.loads(text)['names']
Is there any way better?
Reply all
Reply to author
Forward
0 new messages