November 2015
Beginner to intermediate
840 pages
26h 30m
English
save() Method for TagFormTo best take advantage of inversion of control, Django recommends that developers implement the --str--() and get_abolute_url() model methods. This convention is not mandatory but makes models easier to work with both for developers and other key parts of the framework (we saw how --str--() clarified our interactions in the shell in Chapter 3, and we will see that get_abolute_url() makes our life easier in both Chapter 9 and Chapter 17: Understanding Generic Class-Based Views).
Django forms follow a similar convention with the save() method. The convention of implementing this method is by no means mandatory, but becomes highly useful. It also reveals that forms are typically considered a gateway ...
Read now
Unlock full access