Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#8671 closed (worksforme)

django.views.static.serve shoud have APPEND_SLASH=True

Reported by: est Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords: static
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


When running debug server with some .js .css file using django.views.static.serve while 'show_indexes': True, example, navigate to
when click a 1.jpg listed bellow, I was navigate to

But what I desired URL is

The problem is we should set APPEND_SLASH=True as default here in django.views.static.serve

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed

I cannot recreate this. It looks to me like perhaps you do not have MEDIA_URL set properly in your 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.

comment:2 Changed 6 years ago by mtredinnick

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.