from django.conf.urls import url from . import view urlpatterns = [ url(r'^hello$', view.hello),]
新版本2.0以上:
from django.urls import path from . import view urlpatterns = [ path('hello/', view.hello),]
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:新旧Django版本中urls与path的区别 - Python技术站