book/urls.py
from django.urls import path from . import views urlpatterns = [ path('',views.IndexView.as_view(),name="index"), ]
book/views.py
from django.views import View from django.shortcuts import render class IndexView(View): def get(self,request): return render(request,"index.html")