Use the queryset object update
method:
MyModel.objects.filter(pk=some_value).update(field1='some value')
More Related Contents:
- Using django how can I combine two queries from separate models into one query?
- How to delete a record in Django models?
- How do I filter query objects by date range in Django?
- How can I see the raw SQL queries Django is running?
- Django Aggregation: Summation of Multiplication of two fields
- Getting the SQL from a Django QuerySet [duplicate]
- Custom QuerySet and Manager without breaking DRY?
- LEFT JOIN Django ORM
- Why does django’s prefetch_related() only work with all() and not filter()?
- Django select only rows with duplicate field values
- Select DISTINCT individual columns in django?
- What are the principles behind, and benefits of, the “party model”?
- Django values_list vs values
- Raw SQL queries in Django views
- Best way to model Customer Address
- How to limit queryset/the records to view in Django admin site?
- Django – filtering on foreign key properties
- Why is iterating through a large Django QuerySet consuming massive amounts of memory?
- Count number of records by date in Django
- How to perform OR condition in django queryset?
- What is the best way to access stored procedures in Django’s ORM
- QuerySet, Object has no attribute id – Django
- Get the latest record with filter in Django
- Django in / not in query
- Django query datetime for objects older than 5 hours
- django most efficient way to count same field values in a query
- Django Order By Date, but have “None” at end?
- Django filter JSONField list of dicts
- How to store a dictionary on a Django Model?
- Can a dictionary be passed to django models on create?