Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django - url with automatic slash adding

Tags:

url

django

slash

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.

like image 503
lukasz Avatar asked Dec 14 '10 10:12

lukasz


1 Answers

Try setting APPEND_SLASH = True in settings.py.

On second thoughts, I think the default setting is True.

https://docs.djangoproject.com/en/dev/ref/settings/#append-slash

like image 172
Sriram Avatar answered Nov 05 '22 03:11

Sriram