感谢阅读 问题原因解决办法 问题原因 这是因为django已经把django.conf.urls.url() 废弃掉了 解决办法 from django.urls import re_path as url 替换 from django.conf.urls import url