Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

django ajax body to json

# In Django you need to deserialize the json

import json  
def my_view(request): 	
    body_unicode = request.body.decode('utf-8') 	
    body = json.loads(body_unicode) 	
    content = body['content']
          
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #ajax #body #json
ADD COMMENT
Topic
Name
6+6 =