我无法创建嵌套命名空间,就像它们在https://docs.djangoproject.com/en/1.4/topics/http/urls/中呈现的那样,每次我超过 1 个级别时,我都会丢失所有其他命名空间有没有人成功有了这个,如果是这样,django url的最佳实践是什么。
urlpatterns_3rd_level = patterns('example.basket.views', url(r'^3rd$', 'home', name='home'))
urlpatterns_2nd_level = patterns('', url(r'^2nd$', include(urlpatterns_3rd_level, namespace='basket')))
urlpatterns = patterns('', url(r'^1st$', include(urlpatterns_2nd_level, namespace='store')))
reverse('store:basket:home') # No namespace named basket