You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.
In #4 we noticed that a link to a URL with a slash was returning a 404 while the URL without the slash was valid. Django has an APPEND_SLASH setting that would cause all URLs to have a trailing slash. I'd prefer the opposite. It seems this snippet does what we want:
As an FYI - the above snippet works as expected, but there is a complication. Some of the Django app routes used by the site redirect URLs without a trailing slash to have a trailing slash and wind up in a non-terminating redirect loop.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In #4 we noticed that a link to a URL with a slash was returning a 404 while the URL without the slash was valid. Django has an
APPEND_SLASH
setting that would cause all URLs to have a trailing slash. I'd prefer the opposite. It seems this snippet does what we want:https://djangosnippets.org/snippets/2655/
The text was updated successfully, but these errors were encountered: