Class Based Views
View classes handle methods separately.
Example
from django.views import View
class Hello(View):
def get(self, request):
return HttpResponse("hi")
# path("hello/", Hello.as_view())Exercise
Register a class view.
Hello.()
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.