We call it function based view. Method are function attached to an object.
As far as I know, there is no plan to remove function based view.
But in my opinion, you should definitely have a look at class based
view. They really shine in common task.
An example, a view to create an object will take something like 10 to
20 lines of code in function based view. You need to treat the case of
showing the form, handling a valid form, handling a form with
validation error.
With class based view, that's 4 lines. Declare a class inheriting from
UpdateView, define the url to redirect to in case of valid form, which
model to update and which field to update.
So sure, they are redundant. But they save a lot of time, make the
code easier to understand and prevent error in commons case.
> --
> 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...@googlegroups.com.
> To post to this group, send email to
django...@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/8c81adf0-06e3-400c-beb3-07155e26fa25%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
--
Cordialement, Coues Ludovic
+336 148 743 42