November 2015
Beginner to intermediate
840 pages
26h 30m
English
Before we jump into the deep end, remind yourself that a GCBV is simply a CBV with predefined behavior that expects to have specific attributes or methods overridden. Using GCBVs allows for rapid development of behavior commonly found on websites.
To remind ourselves of how easy their usage is and to prepare for our modification of UpdateView, we can switch NewsLinkUpdate to inherit the GCBV, as shown in Example 18.1.
Example 18.1: Project Code
organizer/views.py in 1b77e1ab78
28 class NewsLinkUpdate(UpdateView): 29 form_class = NewsLinkForm 30 model = NewsLink 31 template_name_suffix = '_form_update'
If this code is opaque or unfamiliar, please review Chapter 17
Read now
Unlock full access