Friday, May 27, 2011

Re: Looking for Class Base Views intro (not Generic Class Base Views!)

One reason its hard to pull the concept of Class Based views and Generic views apart is because they actually go together.  Consider the following:

1.  Class based views typically use the as_view() class method as its entry point, which is typically provided through inheriting from django.views.generic.base.View
2.  Not inheriting from django.views.generic.base.View would require you to implement the Class Based Views behavior and interfaces just like Django already has, which is silly when you can just subclass the generic 'View' function.
3.  So class based views tend to always inherit from some generic django view ... django.views.generic.base.View at the very least.

Hope this is helpful,
Brian

On Thu, May 26, 2011 at 7:39 PM, Mateusz Harasymczuk <mateusz@harasymczuk.pl> wrote:
Anyone?
Class Based Views?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Brian Bouterse
ITng Services

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment