What are Class-based views in Django

devquora
devquora

Posted On: Feb 22, 2020

 

    1 Answer Written

  •  devquora
    Answered by Christopher

    A Class-based view in Django provides an alternative to implementing views as Python objects instead of functions.

    A view in Django is actually a callable which does the work of taking a request and returning a response in return. This is not just a function but is much more than that. Django provides a particular example of some of the classes which can be conveniently used as the views. These allow a person to structure the views and reuse the code by binding the inheritance and the mixins.

Related Questions

Please Login or Register to leave a response.

Related Questions

Django Interview Questions

What does Of Django Field Class types do?

What does Of Django Field Class types do?..

Django Interview Questions

Does Django Follow Architectural pattern?

Does Django Follow Architectural pattern?..