c.g*_*rey 1 python django django-templates
我想在index.html不调用任何视图的情况下将模板调用到特定的URL .
django有可能吗?
from django.views.generic import TemplateView
urlpatterns = [
(r'^home/$', TemplateView.as_view(template_name='index.html')),
]
Run Code Online (Sandbox Code Playgroud)