4 ms·
Class-based generic view is a nice addition. I remember when I was learning Django and going through the official tutorial, that was one part that took me a whi
by ireadzalot 16y ago
Class-based generic view is a nice addition. I remember when I was learning Django and going through the official tutorial, that was one part that took me a while to understand. Kudos guys!
- andybak 16y agoPeople have been using the term 'class-based views' to describe the new feature but am I right in thinking this only affects generic views?
- izak30 16y agoWell, it affects generic views, yes. They also have several mixins that you can use in other views.
- streeter 16y agoNo, you can make your own class based views with the 1.3 codebase. The docs describe them as replacing Generic Views, but nothing stops you from creating your own class hierarchy that inherits from the base TemplateView (http://docs.djangoproject.com/en/1.3/ref/class-based-views/#simple-generic-views http://docs.djangoproject.com/en/1.3/ref/class-based-views/#...)