Changes between Version 1 and Version 2 of Ticket #31860


Ignore:
Timestamp:
Aug 5, 2020, 5:21:45 PM (4 years ago)
Author:
Aleksandr Smechov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31860 – Description

    v1 v2  
    66Author.objects.filter(
    77    Q(articles__isnull=False)
    8     & Q(articles__date_published__date=F("articles__date_edited__date")))
     8    & Q(articles__date_published__date=F("articles__date_edited__date"))
     9)
    910}}}
    1011
     
    1314
    1415{{{
    15 Author.objects
    16     .annotate(date_edited=Func(F("articles__date_edited"), function="DATE"))
    17     .filter(Q(articles__isnull=False) & Q(articles__date_published__date=F("date_edited")))
     16Author.objects.annotate(
     17    date_edited=Func(F("articles__date_edited"), function="DATE"))
     18    .filter(Q(articles__isnull=False) & Q(articles__date_published__date=F("date_edited"))
     19)
    1820}}}
    1921
Back to Top