We construct some types of views over and over again while building a web application, such as a view that displays all entries in the database (e.g., displaying all books in the books table), and so on. These types of views accomplish the same tasks and result in redundant code. Django utilizes class-based generic views to overcome this problem. All we have to do to use generic views is inherit the required class from the django.views.generic module and give some information such as model, context object name, and so on.
Generics are “parametrized types” - In other words they are types which are declared with a parameter (which may be another type or in C++ even any integral value)
So you could have a type defined like list which means a type of list which holds values of type T - T could be anything. You could then have list or list and the same code would work for both.
There are lots of subtle differences in the way generics or their cousin template types are implemented in various languages.