module documentation
The dataexplorer.forms
module defines the relatively complex form that is
used for querying the database later.
It also implements some custom form elements, like ThreeWayToggle
and
ThreeWayToggleWidget
that represent the custom logic and appearance of a
three-way toggle button respectively, which appears numerous times in the
Dashboard interface.
Finally, a custom MultipleChoice field of somewhat unnecessary complexity is implemented here that allows us to select the institutions from which the ptients should be included via check boxes with the institution logo on it.
Class |
|
Form for querying the database. |
Class |
|
Custom class with which one can access additional information from the model that is chosen by the DatasetMultipleChoiceField . |
Class |
|
Customize label description and add method that returns the logo URL for Datasets. The implementation is inspired by how the choices are implemented. But since some other functionality depends on how those choices are implemented, it cannot be changed easily. |
Class |
|
A toggle switch than can be in three different states: Positive/True, unkown/None and negative/False. |
Class |
|
Widget that renders the three-way toggle button and allows to set the attributes of the individual inputs (radio buttons) as option_attrs as well as the attributes of the container as attrs. |
Function | trio |
Transform -1, 0, and +1 to False, None and True respectively. |
Variable | logger |
Undocumented |