[Django]-Django 1.3 URL rewriting

3πŸ‘

βœ…

β€œIs this correct behavior?” No, it’s not. In 4 years of Djangoing I’ve never seen this particular problem.

One way of testing that the CommonMiddleware is causing this is to comment it out in your settings.py file, restart, and then see if you get the same behavior. It can also be instructive to use the standalone development server and stick printβ€˜s in interesting places to see who is mangling it.

πŸ‘€Peter Rowell

0πŸ‘

Check your URL’s. You most likely have defined your URL’s a bit incorrectly. If you have

(r'^admin', include(admin.site.urls))

instead of the correct

(r'^admin/', include(admin.site.urls)),

You will see this type of 404 with the middleware

πŸ‘€John

Leave a comment