Changes between Initial Version and Version 1 of Ticket #32750, comment 2


Ignore:
Timestamp:
May 16, 2021, 9:16:25 AM (3 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32750, comment 2

    initial v1  
     1> It can be works with something like:
     2>
     3> `start_datetime__month=ExtractMonth(Func(OuterRef('start_datetime'), function='', output_field=DateTimeField())),`
     4
     5You can also use `ExpressionWrapper` for [https://docs.djangoproject.com/en/3.2/ref/models/expressions/#django.db.models.ExpressionWrapper this purpose] in the mean time.
     6
     7`start_datetime__month=ExtractMonth(ExpressionWrapper(OuterRef('start_datetime'), output_field=DateTimeField()))`
Back to Top