#24613: Documentation Note for defer might need an example.
--------------------------------------+------------------------------------
Reporter: Naddiseo | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by akulakov):
Replying to [comment:5 timgraham]:
> What does "queryset load time" mean? When the queryset is evaluated and
the database query occurs, or something else?
I think it means when .only() or .defer() method is executed, there's two
time points of interest: module load time, when you can define a module
with a subset of fields, and queryset object creation time (or
modification of existing queryset), when you provide the list of fields to
defer. These are the only two times when you could provide this list of
fields, so if you know the list at the module load time, it's preferred to
define it as a model with a subset of fields, but if you don't know at
module load time, then you don't have this option and you only have
defer() and only() left to use.
--
Ticket URL: <https://code.djangoproject.com/ticket/24613#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.5d8dcc24c5c4a25ce0704f0d2035f2d6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.