'django.core.exceptions.ImproperlyConfigured: The included URLconf 'notes.urls' does not appear to have any patterns in it

I get this error in the root directory, not in an app. The code in urls.py of this root directory is:

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('write_notes.urls'))    # `write_notes` is the name of my app.
]

Code in write_notes.urls:

from django.urls import path
from . import views

urlpatterns = [
    path('', views.IndexView.as_view(), name='index-page'),
    path('/signup', views.SignupView.as_view(), name='signup-page'),
    path('/note', views.WriteNoteView.as_view(), name='write-note-page')
]

What is the error and how do I fix it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source