Opened 17 months ago

Last modified 17 months ago

#32304 closed Bug

Django adds spurious "/" prefix to settings.STATIC_URL="http://server/" — at Initial Version

Reported by: Adam Hooper Owned by: nobody
Component: contrib.staticfiles Version: 3.1
Severity: Release blocker Keywords:
Cc: Florian Apolloner Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Here's a piece of settings from a totally reasonable, sensible, okay Docker integration-test environment

STATIC_URL = "http://minio/static/"

Django 3.1 will implicitly add "/" to the URL, so my URLs look like ""/http://minio/static/images/app-icons/favicon.ico".

The features and bugs that interact here:

  • commit c574bec, adding feature #25598, prepends SCRIPT_NAME to STATIC_URL when STATIC_URL isn't a URL.
  • bug #9202: according to Django, "http://minio/static/" isn't a valid URL. (It is.)

Top me, the easiest fix is to address #9202....

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top