mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #20223 -- Added keep_lazy() as a replacement for allow_lazy().
Thanks to bmispelon and uruz for the initial patch.
This commit is contained in:
parent
93fc23b2d5
commit
d693074d43
21 changed files with 237 additions and 59 deletions
|
@ -223,7 +223,7 @@ QuerySet <when-querysets-are-evaluated>`. Avoiding the premature evaluation of
|
|||
a ``QuerySet`` can save making an expensive and unnecessary trip to the
|
||||
database.
|
||||
|
||||
Django also offers an :meth:`~django.utils.functional.allow_lazy` decorator.
|
||||
Django also offers a :meth:`~django.utils.functional.keep_lazy` decorator.
|
||||
This allows a function that has been called with a lazy argument to behave
|
||||
lazily itself, only being evaluated when it needs to be. Thus the lazy argument
|
||||
- which could be an expensive one - will not be called upon for evaluation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue