Code

Opened 5 years ago

Closed 5 years ago

#10483 closed (duplicate)

it would be better if parameters of QuerySet were lazily evaluated

Reported by: liangent Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: liangent@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

see #10466

i think a lazy evaluation is better. this can give a choice to do that. if you want eager evaluation, you can add ().

i met that problem when i was trying to get an object list page by generic view and i created the queryset in urls.py. now, i have to write a view to just wrap the generic view and pass the current time to it. i think it can be simplified by implementing lazy evaluation in parameters of querysets.

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Malcolm's comment in #10466 explicitly said "This behaviour isn't going to change". If you disagree with this decision, the solution is to start a discussion on Django-developers, not opening a new ticket.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.