Creating custom widgets

As you saw in Chapter 10, Backend Views, we can use widgets to display certain data in different formats. For example, we used widget='image' to display a binary field as an image. To demonstrate how to create your own widget, we'll write one widget that lets the user choose an integer field, but we will display it differently. Instead of an input box, we will display a color picker, so that we can select a color number.

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

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