我用python3.7,它的urlpatterns里面不是url函数而是path函数,怎么配置?
我用python3.7,它的urlpatterns里面不是url函数而是path函数,怎么配置?
我用python3.7,它的urlpatterns里面不是url函数而是path函数,怎么配置?
2019-11-06
# myblog\urls.py urlpatterns = [ path('admin/', admin.site.urls), path('blog/', include(('blog.urls', 'blog'), namespace='blog')), path('blog2/', include('blog2.urls')), ] # blog\urls.py urlpatterns = [ path('index/', views.index), path("article/<article_id>", views.article_page, name='article_page'), path("edit/<article_id>", views.edit_page, name="edit_page"), path("edit/action/", views.edit_action, name="edit_action"), ]
举报