class documentation

Widget that renders the three-way toggle button.

It also allows to set the attributes of the individual inputs (radio buttons) as option_attrs as well as the attributes of the container as attrs.

Method __init__ Store arguments and option attributes for later use.
Method create_option Pass the option attributes to the actual options.
Method get_context Pass label and tooltip to the context variable.
Class Variable option_template_name HTML template that renders the individual options of the button.
Class Variable template_name HTML template that renders the button containing its three options.
Instance Variable label Undocumented
Instance Variable option_attrs HTML attributes. Also adds the call to a JS function.
Instance Variable tooltip Undocumented
def __init__(self, attrs=None, choices=(), option_attrs=None, label=None, tooltip=None):

Store arguments and option attributes for later use.

def create_option(self, name, value, label, selected, index, subindex=None, attrs=None):

Pass the option attributes to the actual options.

def get_context(self, name, value, attrs):

Pass label and tooltip to the context variable.

option_template_name: str =

HTML template that renders the individual options of the button.

template_name: str =

HTML template that renders the button containing its three options.

label =

Undocumented

option_attrs =

HTML attributes. Also adds the call to a JS function.

tooltip =

Undocumented