Reputation: 4261
In Django, we define url mapping in urls.py. Whats the difference between these two?
/app/kill/$
/app/kill$
Upvotes: 0
Views: 91
Reputation: 5442
They are both very different urls. But for must users they will be expected to be the same so django has a nice feature for this: the APPEND_SLASH settings variable. From the docs:
When set to True, if the request URL does not match any of the patterns in the URLconf and it doesn't end in a slash, an HTTP redirect is issued to the same URL with a slash appended.
Upvotes: 2