Hi,

There also exists django-vanilla-views [1] which are a bit simplified version of generic class based views. You may find them easier to cope with (less magic).


[1] http://django-vanilla-views.org/

On 04.04.2017 01:59, Some Developer wrote:
I'm about to start a new website and I'll make it a point to use some generic class based views when I think they are appropriate. I'll also try and move my custom user application that I use for all of my projects over to class based views as wells. Especially as the login() and logout() functions are being deprecated in the next release and being replace with class based views.

I'm sure I'll get the hang of them. I think the main problem I have is that I haven't memorised them yet. I've pretty much memorised everything that I need to do with function based views (with a few exceptions which are not that hard to look up). I guess once I have memorised everything that I need to know I'll be back being productive with them.

Hopefully it all goes OK :).

On 03/04/2017 21:09, Andréas Kühne wrote:
I really think you should revisit CBV's - you don't have to use the
generic views unless they make sense. I regularly override most of my
own with mixins and the like. And like you said - querying the database
and returning a template is probably one of the most common things I do.
That's a detail view and 3 rows of code.

I understand that you like the way you work - but I think CBV's is
probably one of the greatest additions to django - mostly because of
mixins and inheritance.

Regarding the need to use 2 forms in the same view - I haven't stumbled
across that usecase yet - but I probably wouldn't have an issue in CBV's
either - but couldn't use the generic FormView for that though.

Regards,

Andréas




--
Jani Tiainen

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ea745488-e56e-a027-dd4c-9cd63369bc66%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to