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
There are two ways can hanlded this.
Firstly,you can set an app_name attribute in the included URLconf module, at the same level as the urlpatterns attribute. You have to pass the actual module, or a string reference to the module, to include(), not the list of urlpatterns itself.
https://docs.djangoproject.com/en/2.0/topics/http/urls/#url-namespaces-and-included-urlconfs
urls.py
from django.urls import include, path
urlpatterns = [
path('polls/', include('polls.urls')),
]
polls/urls.py
from django.urls import path
from . import views
app_name = 'polls'
urlpatterns = [
path('', views.IndexView.as_view(), name='index'),
path('/', views.DetailView.as_view(), name='detail'),
...
]
have fun!