The writing method of URL after Django 1.10 is different from the previous version. The above comments describe three supported writing methods. The function should be introduced first and then called. You may be seeing an old version of the tutorial
Title: After creating a new project, let’s create an app.
Then add views, models, urls, etc. in the app.
You haven’t imported your new project yet, when you are writing urlpatterns
There is a problem with the url syntax, and views are not imported
The code in the urlpatterns part of your urls module should be as follows:
The writing method of URL after Django 1.10 is different from the previous version. The above comments describe three supported writing methods. The function should be introduced first and then called. You may be seeing an old version of the tutorial