Your URL pattern '^test$' has a route that contains '(?P<', begins with a '^', or ends with a '$'. This was likely an oversight when migrating to django.urls.path().
报错信息Your URL pattern '^test$' has a route that contains '(?P<', begins with a '^', or ends with a '$'. This was likely an oversight when migrating to django.urls.path().错误原因在django 2.0版本之后其路由书写方式发生了变化解决方法把URL函数替换为path不用 ^ $做路由2.0版本之前的路由2.0版