django中url模式url之间的差异
两者的区别是什么django中url模式url之间的差异,django,url-pattern,Django,Url Pattern,两者的区别是什么 1. url(r'^$', views.Home.as_view(), name='home'), 及 在view.py中: class Home(TemplateView): template_name = "index.html" 1的输出是,当单击它所说的另一个时,它将只重定向到index.html Not Found The requested resource was not found on this server. 第二个的输出是:它显示UI页面,
1. url(r'^$', views.Home.as_view(), name='home'),
及
在view.py中:
class Home(TemplateView):
template_name = "index.html"
1的输出是,当单击它所说的另一个时,它将只重定向到index.html
Not Found
The requested resource was not found on this server.
第二个的输出是:它显示UI页面,但后台django应用程序API不执行
Not Found
The requested resource was not found on this server.