Reputation: 5800
I am trying to namespace Flatpages in Django. I included /pages/
in URLConf and added one URL /help/
in Django Admin Sites module. However, the page is loading with '/help/' and '/pages/help/' both URLs. I am trying to stop this behaviour and only load the page with /pages/help/
. How is this possible?
urlpatterns = [
...
url(r'^pages/', include('django.contrib.flatpages.urls')),
]
Upvotes: 0
Views: 115
Reputation: 31404
You must have the fallback middleware installed in your MIDDLEWARE_CLASSES
setting:
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware'
Remove it, and then it will only work on the prefix you have specified.
Upvotes: 1