Reputation: 661
In my base urls.py file, I have these urls:
urlpatterns = patterns('',
url(r'', include('apps.trainee.urls', namespace='trainee')),
url(r'', include('apps.landing.urls', namespace='landing')),
...
...
...
url(r'^cache/$', memcached_status, name='memcached_status'),
)
I'm taking this project over from another developer, and haven't been able to grasp my mind around what these first two urls are doing. They're both namespaced, and from the Django docs about namespacing, I haven't quite been able to figure out why my third url r'^cache/$'
Doesn't work. It 404s every single time. However, when I comment the first two urls out, then it works fine. Can anyone shed some light on this situation and why it's happening? Much thanks.
Upvotes: 0
Views: 108
Reputation: 46300
The first two url patterns include a bunch of other url patterns. Probably in one of those includes there is a url pattern that also matches cache/
. Look into the files of the includes.
Upvotes: 1
Reputation: 6355
You might just need to move the third url to the top. One of the first 2 might be eating up any url and then raising a 404 for some reason. This happens a lot. The order of the urls is very important.
Upvotes: 2