def __init__(self, field_to_send, attrs=None, choices=()): """ Initializes parent classes BootstrapTable and Widget and sets some variables to allow imitating Select widget with use of BootstrapTable. Args: field_to_send: name of field, from which value will be send to server, when submitting your form. attrs: standard Django's attributes, to pass into Widget initializer. choices: iterable with options available to choose (rows' contents). """ BootstrapTable.__init__(self) Widget.__init__(self, attrs) self._choices = None self.choices = list(choices) self.set(clickToSelect=True) self.set(idField=field_to_send)
def __init__(self, attrs=None, choices=()): # skip choice initialization in widgets.ChoiceWidget.__init__ Widget.__init__(self, attrs) self.choices = choices
def __init__(self, selectedValue='1'): Widget.__init__(self) self.selectedValue = selectedValue