freedomofpress / securethenews

An automated scanner and web dashboard for tracking TLS deployment across news organizations
https://securethe.news
GNU Affero General Public License v3.0
102 stars 25 forks source link

STN-68 Redirect URLs without trailing slashes #51

Closed garrettr closed 7 years ago

garrettr commented 7 years ago

This restores the default behavior of Django/Wagtail.

I originally set WAGTAIL_APPEND_SLASH = False because I thought the trailing slashes looked ugly in conjunction with the header permalinks added in 88d6e41. e.g.

However, I think this is a relatively minor aesthetic issue, and I think it is more important that URLs behave according to the "principle of least astonishment". This PR reverts to the less-astonishing default behavior, wherein every Django/Wagtail page canonically has a trailing slash, and Django/Wagtail automatically redirects URLs without a trailing slash.

conorsch commented 7 years ago

Magnificent! I've been manually appending the trailing slash to /admin/ and squinting in irritation every time. This looks great, +1 for merge.