Advertisement
Guest User

Untitled

a guest
Feb 20th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. from django.views.decorators.csrf import csrf_exempt
  2. import json
  3.  
  4. @csrf_exempt
  5. def test_json(request):
  6.     json_data=open('test.json')
  7.     properties = json.load(json_data)
  8.     json_data.close()
  9.     return HttpResponse(json.dumps(properties), content_type = "application/json")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement