How to select a record and update it, with a single queryset in Django?

How do I run an update and select statements on the same queryset rather than having to do two queries:
– one to select the object
– and one to update the object

The equivalent in SQL would be something like:

update my_table set field_1 = 'some value' where pk_field = some_value

7 Answers
7

Leave a Comment