def blog_post(request,post_id): #your code blog_object=Blog.objects.get(id=post_id) blog_object.blog_views=blog_object.blog_views+1 blog_object.save() #your code