Home > Software design >  How to update post in Django with out using Django forms
How to update post in Django with out using Django forms

Time:02-19

I want to update a post in Django, but I don't want to use Django forms for this is there any way to do that. Eg I want to update the title and description of my post.

CodePudding user response:

You can use Ajax/Js to send post requests to the server.

CodePudding user response:

def your_view_name(request, id):
     updata_data = modelname.objects.filter(id = id)

and then render out related fields in your template file

  • Related