Django 2.0 'name' is not a registered namespace

前端 未结 6 2409
别那么骄傲
别那么骄傲 2021-02-14 17:46

I\'ve seen this error posted several times, but I can\'t find anyone using Django 2.0 and having the problem.

The problem cropped up when I tried to nest one app inside

6条回答
  •  醉酒成梦
    2021-02-14 18:25

    You need to actually tell it what the namespace is.

    Change this line:

    path('users/', include('users.urls')),
    

    to:

    path('users/', include('users.urls', namespace="users")),
    

    Read the documentation

提交回复
热议问题