Defining model methods and using the API decorators

The model classes that define custom data models declare fields for the data that's processed by the model. They can also define custom behavior by defining methods on the model class.

In this recipe, we will see how we can write a method that can be called by a button in the user interface, or by another piece of code in our application. This method will act on LibraryBooks and perform the required actions to change the state of a selection of books.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset