Using Django/python to JSON posts
Question: I'm new to using Django so please forgive my ignorance with such a general
question. How would you go about displaying JSON posts from a python script? I
have a python script which updates an sqlite3 database and creates a JSON
object. I want to display this data on a Django frontend. Bonus points if you
can give advice on how to make it live update as the database is updated. Any
guidance would be helpful.


Answer: See Django's [JsonResponse](https://docs.djangoproject.com/en/1.8/ref/request-
response/#jsonresponse-objects). Use this in your views.py and return the json
as a response in your view.

    
    
    from django.http import JsonResponse
    
    
    ...
        return JsonResponse(<your_JSON_object>)
    

