Django Error u“'polls” is not a registered namespace

后端 未结 13 2603
误落风尘
误落风尘 2021-01-31 07:41

Yesterday I was working on my first app using this tutorial. It\'s a Poll and Choice app. The first page displays the question and when you click on the question it\'s suppose t

相关标签:
13条回答
  • 2021-01-31 08:29

    Following the same Django tutorial and having the same names, I had to change in mysite/urls.py from:

    url(r'^polls/', include('polls.urls')),
    

    to:

     url(r'^polls/', include('polls.urls', namespace="polls")),
    
    0 讨论(0)
提交回复
热议问题