cbv的方式

1.簡單的url

from django.views.generic import TemplateView

path('', TemplateView.as_view(template_name='app01/index.html')),

2,寫到類裡

繼承了View,