Opened 19 years ago
Closed 18 years ago
#2296 closed defect (fixed)
[patch] MEDIA_URL should be documented as requiring a trailing slash with a path component
Description ¶
Due to the not-immediately-intuitive way python's urlparse.urljoin() works, MEDIA_URL requires a trailing slash if it includes a path component -- otherwise the last component of the path will be removed in the urljoin.
It would be good to point this out in the documentation wherever MEDIA_URL is mentioned, and provide an example in the default settings.py that makes this obvious (currently the example setting there has no path component).
Cheers,
Nick
Change History (4)
comment:1 by , 18 years ago
Keywords: | slash trailing settings media_url added |
---|---|
Version: | → SVN |
by , 18 years ago
comment:2 by , 18 years ago
Has patch: | set |
---|---|
Summary: | Non-obvious python "feature" requires explicit mention in documentation → [patch] MEDIA_URL should be documented as requiring a trailing slash with a path component |
Triage Stage: | Unreviewed → Ready for checkin |
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Could the settings documentation at least be updated to show that a trailing slash is required? Seems like a no-brainer to me...