Django-View

Make a Blog using Django Part 2

From previous post, you have configured and ran django, also added admin site to the django. To view the working source of this tutorial, check here at: https://github.com/ruddra/myblog Now click on the myblog section and click add to add new blog. You can create new tags using Tags section of the admin page or clicking the (+) button right beside the Tags section on the new blog creation page, marked with blue circle in the previous image. After successfully adding a new blog, you can see it…

Keep reading

Sample Ajax GET/POST Request in Django

Let us make a test scenario here: A dropdown field which on change we are going to send a Get/Post request to Django and return response. Let us start coding.... <select id="select_dropdown"> <option value='joshua'>joshua</option> <option value='peter'>peter</option> .... .... </select> Let's make an Ajax request after the change in the dropdown field. $(document).ready(function(){ $('#select_dropdown').change(function(){ var e = document.getElementById("select_dropdown"); var value = e.options[e.selectedIndex]…

Keep reading