#34028: Django 'static' template tag fails to generate URLs with SCRIPT_NAME
prefix
---------------------------------+------------------------------------
Reporter: Stewart Adam | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Comment (by Stewart Adam):
Had a chance to debug a bit more and caching of SCRIPT_NAME aside, even if
users use FORCE_SCRIPT_NAME to ensure the prefix is hardcoded and
correctly set at all times it looks like there's still something awry:
Whitenoise middleware sees the prefix as '/' during initialization -
set_script_prefix() only appears to be called during the first HTTP
request, but whitenoise needs to verify the user-provided values for
STATIC_URL during middleware initialization. During that middleware
initialization, the prefix remains '/' despite FORCE_SCRIPT_NAME being
set.
I've posted more details here:
https://github.com/evansd/whitenoise/issues/271#issuecomment-1257389536
--
Ticket URL: <https://code.djangoproject.com/ticket/34028#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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018377ab3716-22859cf3-c8fb-405c-99f0-e04c11e91b0a-000000%40eu-central-1.amazonses.com.