#31083: Add select_related support for Site.objects.get_current
---------------------------------+--------------------------------------
Reporter: Kris Ciccarello | Owner: nobody
Type: New feature | Status: closed
Component: contrib.sites | Version: master
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => wontfix
Comment:
Hi Kris.
Thanks for the report.
> Given the use of `SITE_CACHE`…
I'm not quite following the need for this here. `SITE_CACHE` holds the
instantiated `Site` objects, which would fetch `detail` the first time it
was accessed but then re-use the same fetched `SiteDetail` from memory,
rather than re-hitting the database each time after that. (Yes?) So, I
can't see there's much optimisation to be had...
Beyond that, most uses of the sites framework are ''behind the scenes'' so
it's not clear that users would have much opportunity to pass the
select_related parameter. (Most times we're not calling
`get_current_site()` ourselves.)
As such, I don't think this is a needed addition. Please follow-up though
if I've missed the point. Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/31083#comment:3>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.ffd54cd2995ad25805b871279f2590d5%40djangoproject.com.