Changes between Initial Version and Version 1 of Ticket #33970, comment 4
- Timestamp:
- Aug 31, 2022, 3:36:33 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33970, comment 4
initial v1 4 4 I see this as a clear indication that it is how code like that should look as a "best practice". 5 5 6 This is an example from the tests that also doesn't require qs to be defined bu7 {{{8 9 def test_ordered_select_for_update(self):10 with transaction.atomic():11 qs = Person.objects.filter(12 id__in=Person.objects.order_by("-id").select_for_update()13 )14 self.assertIn("ORDER BY", str(qs.query))15 16 }}}17 18 6 19 7 But sure, do what you want, I won't disturb anymore.