1👍
There is no need to import urlpatterns
from anywhere. urlpatterns
is a variable that should be defined in the urls.py
file, so:
from django.contrib import admin
from django.urls import include, path
# from django import urlpatterns
urlpatterns = [
path('tasks/', include('tasks.urls')),
]
There also should not be a trailing comma after the closing square bracket (]
).
Source:stackexchange.com