Is it necessary to have a model and inheritance in class based views?
Yes, passing the modal is important in django generic views because ListView
inherits from BaseListView
which is again inherits from MultipleObjectMixin
. The MultipleObjectMixin
makes it mandatory to pass modal in the query_set.
See Django code of MultipleObjectMixin
to get a better understanding.