I have the following URL co开发者_开发技巧nfs:
urls.py:
# ...
url(r'^test$', 'project.main.views.test', name='test'),
url(r'^app', include('project.app.urls')),
app/urls.py:
# ...
url(r'^$', 'project.app.views.home', name='home'),
When navigating to example.com/test I get the proper view. But when naivgating to example.com/app I get a 404. APPEND_SLASH is set to TRUE, if it matters.
Fixing all my URLs to end with a slash solves this, but I rather not have my URLs with those useless slashes at the end.
What am I missing?
It turns out there's some corrupt module in my PYTHONPATH which somehow messes up the entire url conf.
When working from a clean environment (i.e. using virtualenv), everything works great.
加载中,请稍侯......
精彩评论