Django Post Like w/ AJax and Rest API

Step 1 - Create a simple post like view.

Step 2 - Create a class based APIView for post like with REST API response. Api json response - {"updated":true,"liked":false}

Step 3 - Use JQuery to update the likes count and unlike after like without refreshing the page.