#8671 closed (worksforme)
django.views.static.serve shoud have APPEND_SLASH=True
Reported by: | est | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | static | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When running debug server with some .js .css file using django.views.static.serve while 'show_indexes': True, example, navigate to
http://127.0.0.1:8000/images
when click a 1.jpg listed bellow, I was navigate to
http://127.0.0.1:8000/1.jpg
But what I desired URL is
http://127.0.0.1:8000/images/1.jpg
The problem is we should set APPEND_SLASH=True as default here in django.views.static.serve
Change History (2)
comment:1 by , 16 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 16 years ago
Even if this is recreateable, it's just a bad idea. It's static media. Just specify the right URL. Django shouldn't mess with those URLs just to fix up typos in the HTML files.
I cannot recreate this. It looks to me like perhaps you do not have MEDIA_URL set properly in your settings.py file. It appears it needs to be set to '/images' in your case but your server is operating as if it were set to the default empty string.