Hi,

Thank you for the link. I'll check it out.

On 02/04/2017 07:43, Antonis Christofides wrote:
Hi,

This is not an answer to your question (which was answered by James
Bennett anyway), but I liked this recent article about class vs.
function based views:

https://simpleisbetterthancomplex.com/article/2017/03/21/class-based-views-vs-function-based-views.html

This is his conclusion:

    I usually always start my views as function-based views. If I can
    use a generic class-based view just by overriding the attributes, I
    go for it. If I have some very specific needs, and it will replicate
    across several views, I create my own custom generic view
    subclassing the |django.views.generic.View|.

Regards,

A.

Antonis Christofides
http://djangodeployment.com

On 04/02/2017 06:37 AM, Some Developer wrote:
Hi,

I was wondering if function based views will ever be deprecated? I
absolutely hate class based views with a passion for various reasons
(too complex, trying to solve a problem that doesn't exist etc). With
a function based view I can write it in 2 minutes pretty much and
handling multiple forms on the same page is a piece of cake. The same
is not true of class based views. You need to look up which classes a
certain class based view inherits from to see what methods are
available, handling multiple forms on the same page is a pain in the
arse if not impossible and various other things that are just way more
difficult than they should be.

So yeah. Are function based views ever going to go away? I've already
noticed that in Django 1.11 the login() and logout() functions are
going away in favour of class based views which seems silly as I'll
have to rewrite my perfectly working user app to use class based views
now.

Is that a sign of things to come? If that is what the developers are
planning can I please beg them to reconsider? Function based views are
just fine. You might prefer class based views but there are users out
there who much prefer function based views.

Please don't take this as an aggressive post. I love working with
Django and I'm just passioniate about it. This isn't a flame post.

Thank you for any help :).

Some Developer.


--
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/b65adf12-e46e-8baf-398b-edae0c0fbc85%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to