1.简单的url
from django.views.generic import TemplateView path('', TemplateView.as_view(template_name='app01/index.html')),
2,写到类里
继承了View,