Adding a monetary field to a model
We will continue to use the
my_library add-on module from the previous recipe.
How to do it...
The monetary field needs a complementary currency field to store the currency for the amounts.
my_library already has
models/library_book.py, which defines a basic model. We will edit this to add the required fields: