Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are class based views really any good for anything outside of CRUD? I've found the documentation (and, more importantly, rationale) lacking. Generally, when I try and use them, I spend more time figuring out how to customise than when I write "normal" views.


I should be specific. I never use the built in Django views. I'm sure they're great but I don't like that much magic and I moved to class based views later in a project.. those seems easier in a clean-room build.

I do, however use class based views that I've built myself. We extend them and add mixins and I much prefer all of this to the decorator soup that is the alternative.


Ah, fair enough, that makes more sense. Last time I tried to use the built-in ones, I just scrapped the project after two days and redid it with functions. It's not magic if it doesn't work!


There's definitely a learning curve, but CBVs will give you much DRYer views. Being able to use mixins is a godsend.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: