django - url with automatic slash adding

lukasz picture lukasz · Dec 14, 2010 · Viewed 11.6k times · Source

I'm using django admin on my website. When I enter url without slash after admin (http://example.com/admin) I receive 404 error. I thought that django automatically added slash on the end of url. Of course when I enter url ended with slash it works fine. What I am doing wrong, or which settings I have to change. Thanks for any ideas.

Answer

Sriram picture Sriram · Dec 14, 2010

Try setting APPEND_SLASH to true in settings. On second thoughts, I think the default setting is true.

http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs