ImproperlyConfiguredError about app_name when using namespace in include()

前端 未结 5 1853
北荒
北荒 2020-12-02 14:59

I am currently trying out Django. I use the namespace argument in one of my include()s in urls.py. When I run the server and try to browse, I get t

5条回答
  •  忘掉有多难
    2020-12-02 15:34

    Check the docs for include here.

    What you've done is not an acceptable way of passing parameters to include. You could do:

    url(r'^reviews/', include(('reviews.urls', 'reviews'), namespace='reviews')),
    

提交回复
热议问题