News for hackers. Stuff that matters.
Re:Django Styleguide by asalahli on Wednesday January 11, 2023 @04:11PM (#34344918)
In my view (hehe), Django's class based views is a good idea implemented poorly. In theory you should be able to use any of the built-in class based generic views with minimal customizations to suit your needs, except when you want to do such customizations you're left dealing with a huge inheritance tree of mixins. It's all magic unless you know or wanna read the documentation on what each mixin brings to the view, that is _if_ you know what mixins are involved exactly, of course.
Re:Django Styleguide by collyw on Wednesday January 11, 2023 @05:07PM (#34345693)
Are you aware of https://ccbv.co.uk/? After I discovered that, class based views became easy.
Re:Django Styleguide by adamckay on Wednesday January 11, 2023 @06:35PM (#34346665)
And if you're using DRF there's https://www.cdrf.co/
Re:Django Styleguide by asalahli on Wednesday January 11, 2023 @08:04PM (#34347645)
Wow, 8 years of using Django and I did not know about either of these. Thanks!