Skip to content
Advertisement

How to update the one attribute of model once form is validated in Django?

I have a model

JavaScript

and a form

JavaScript

Now I have captured all the data using POST API form is validated.

JavaScript

How do I update status parameter of model in django after form validation is successful ?

Advertisement

Answer

Retrieve the underlying model instance, change the field value and save the form.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement