updated the views.py to fix json dumps