3 ms·
Me too. I never got CBV. I usually use more than one model in a view.
by brianwawok 9y ago
Me too. I never got CBV. I usually use more than one model in a view.
- bebop 9y agoThere are TemplateView and View that give you all the good stuff of CBV's without needing to use the more tailored versions. That way instead of needing to do if request.method == 'GET': something() elif request.method == 'POST': save() you can just override the get and post method, and do all the init stuff in dispatch. I have found this to be a really clean way to deal with views that need to do more than what the CBV's give by default.