'Specifying a namespace in django.conf.urls.include() without ' とエラーが出ました。
Tracebackには
'Specifying a namespace in django.conf.urls.include() without ' django.core.exceptions.ImproperlyConfigured: Specifying a namespace in django.conf.urls.include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.
と出力されました。
djangostudyというアプリを作っていて、
そのdjangostudyのurls.pyに
from django.conf.urls import include,url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^polls/',include('polls.urls',namespace='polls')), ]
と記載しました。
url(r'^polls/',include('polls.urls',namespace='polls')),
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。