This is a matter of opinion, I personally disagree with Luke Plant on this, and I fell in love with Class Based Views . I think that most of the resistance of the Django community eagerly accepted them because they couldn’t easily see how they worked (the implementation uses a lot of mixins and it can be difficult to follow), and the documentation was not enough, which I think that there were many misunderstandings regarding Generic CBV and simple CBV. (for a long time, when you Googled "django class based views", the first results concerned general views).
Now the documentation is getting much better, and the tools that are easy to understand are great (see ccbv.co.uk or pudb ).
I suggest learning and using Class Based Views for the same reasons that people offer OOP, it reduces code reuse and increases code reuse (inheritance, mixins) ... in other words, it is DRY.
Another thing worth checking out is how other projects use CBV ... one of my last favorites is django-oscar , which uses them for a good effect.
Matt
source share