0
在我的主要URLconf中,我包括一个应用程序的URL配置:当urlconf不为空时,Django会抛出NoReverseMatch错误?
url(r"^items/$", include("items.urls")),
在items/urls.py
我:
urlpatterns = patterns("",
url(r"^profile/", ProfileView.as_view(), name="accounts_profile"),
url(r"^$", DashboardView.as_view(), name="items_home"),
)
的问题是,不管是什么我进入到URL配置 - 除了r"^$"
- 我在模板中调用NoReverseMatch
错误,通过例如调用其中一个urlconf {% url accounts_profile %}
。我尝试过不同的应用程序,不同的urlconf名称等不同的意见,但没有运气。有任何想法吗?
我使用的是Django 1.3.1,FWIW。
即将点击“发布您的答案”= p。你可能还想使用r“^ profile/$” – okm 2012-04-08 09:30:23