Changes between Initial Version and Version 1 of Ticket #33958


Ignore:
Timestamp:
Aug 28, 2022, 11:37:02 PM (21 months ago)
Author:
Mariusz Felisiak
Comment:

Thanks for the report!

PR

Ticket is not required for such a small cleanups, by the way.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33958

    • Property Has patch set
    • Property Patch needs improvement set
    • Property Owner changed from nobody to Iván Triviño
    • Property Triage Stage UnreviewedAccepted
    • Property Status newassigned
    • Property Summary Missing import in "Expressions can reference transforms" sectionMissing imports in "Expressions can reference transforms" section.
    • Property Type BugCleanup/optimization
  • Ticket #33958 – Description

    initial v1  
    77>>> from django.db.models import Min
    88}}}
     9
     10Also, the following code is shown:
     11{{{
     12>>> Entry.objects.values('pub_date__year').annotate(
     13...     top_rating=Subquery(
     14...         Entry.objects.filter(
     15...             pub_date__year=OuterRef('pub_date__year')
     16...         ).order_by('-rating').values('rating')[:1]
     17...     ),
     18...     total_comments=Sum('number_of_comments'))
     19}}}
     20There are missing imports for {{{Subquery}}}, {{{OuterRef}}} and {{{Sum}}} functions:
     21{{{
     22>>> from django.db.models import Subquery, OuterRef, Sum
     23}}}
Back to Top