August 2016
Beginner to intermediate
717 pages
15h 24m
English
Django views are callables that take requests and return responses. In addition to the function-based views, Django provides an alternative way to define views as classes. This approach is useful when you want to create reusable modular views or combine views of the generic mixins. In this recipe, we will convert the previously shown function-based movie_list view to a class-based MovieListView view.
Create the models, form, and template similar to the previous recipes, Filtering object lists and Managing paginated lists.
as_view() method is used, as follows: ...Read now
Unlock full access