按照django官方教程建了项目,在项目根目录建了urls.py
创建了urlpatterns,在plots目录下的urls再指向views中的httpspone:
urlpatterns = [ path('admin/', admin.site.urls), path('plotss/', include('plots.urls')) ]
但打开网页,发现没有识别到‘plotss/'这个path,提示:
Using the URLconf defined in DemoMap.urls
,
Django tried these URL patterns, in this order:
admin/
The current path, plotss
, didn't match any of these.
为什么会这样呢?
碳酸14