Changes between Initial Version and Version 1 of Ticket #33970, comment 4


Ignore:
Timestamp:
Aug 31, 2022, 3:36:33 AM (20 months ago)
Author:
Thomas Frössman

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33970, comment 4

    initial v1  
    44I see this as a clear indication that it is how code like that should look as a "best practice".
    55
    6 This is an example from the tests that also doesn't require qs to be defined bu
    7 {{{
    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 
    186
    197But sure, do what you want, I won't disturb anymore.
Back to Top