Opened 18 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
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | normal | Keywords: | slash trailing settings media_url |
Cc: | 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
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
Attachments (1)
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...