as_view is the function(class method) which will connect my MyView class with its url. Returns a callable view that takes a request and returns a response : You just can’t use class-based views like you could in normal function-based views. Now, call this function and pass the request .
Read moreHow do I create a function view in Django?
Function based views in Django
Read more