#25598: support for SCRIPT_NAME for static tag and FileField.url
-------------------------------------+-------------------------------------
Reporter: DheerendraRathor | Owner: nobody
Type: New feature | Status: new
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: script_name, | Triage Stage:
static_url, media_url | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):
* component: Uncategorized => contrib.staticfiles
Comment:
I see. I guess the idea would be to use `get_script_prefix()` like
`reverse()` does as I don't think we have access to `request` everywhere
we need it. It seems like some public APIs like `get_static_url()` and
`get_media_url()` would replace accessing the settings directly whenever
building URLs. For backwards compatibility, possibly these functions could
try to detect if the setting is already prefixed appropriately.
Removing the prefix from the settings, however, means that the URLs are no
longer correct when generated outside of a request/response cycle though
(#16734). I'm not sure if it might create any practical problems, but we
might think about addressing that issue first.
--
Ticket URL: <https://code.djangoproject.com/ticket/25598#comment:5>
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/074.12b43b779a8c30ccc5d88243238aa87b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.