Opened 17 years ago
Closed 17 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: | dev |
| Severity: | Keywords: | ||
| Cc: | liangent@… | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
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.
Note:
See TracTickets
for help on using tickets.
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.