版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/SilentWu/article/details/88205831
在运行Django过程中,PyCharm的console提示“WARNINGS:
?: (2_0.W001) Your URL pattern '^index' has a route that contains '(?P<', begins with a '^', or ends with a '$'. This was likely an oversight when migrating to django.urls.path().”
原因:从Django2.0以后,urls.py配置不同
解决方案:
-
把url函数换成path
-
不适用^,$作路由