Changes between Initial Version and Version 1 of Ticket #28731
- Timestamp:
- Oct 21, 2017, 1:00:06 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28731 – Description
initial v1 2 2 {{{ 3 3 q = Q() # Dynamically constructed, possibly empty 4 x = TestModel.objects.annotate(test_name= When(q, then=Value(True)), default=Value(False), output_field=BooleanField())).all()4 x = TestModel.objects.annotate(test_name=Case(When(q, then=Value(True)), default=Value(False), output_field=BooleanField())).all() 5 5 print(x) 6 6 }}}