Skip to content
This repository was archived by the owner on Jun 19, 2021. It is now read-only.
This repository was archived by the owner on Jun 19, 2021. It is now read-only.

Make URLs work with or without trailing slash #5

@tylerdave

Description

@tylerdave

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/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions