Updated views.py

Added json response.