def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) self.limit = kwargs.pop('limit', None) widget = kwargs.get('widget', self.widget) or self.widget if isinstance(widget, type): kwargs['widget'] = widget(lookup_class, limit=self.limit) super(AutoCompleteSelectMultipleField, self).__init__(*args, **kwargs)
def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) self.allow_new = kwargs.pop("allow_new", False) self.limit = kwargs.pop("limit", None) widget = kwargs.get("widget", self.widget) or self.widget if isinstance(widget, type): kwargs["widget"] = widget(lookup_class, allow_new=self.allow_new, limit=self.limit) super(AutoCompleteSelectField, self).__init__(*args, **kwargs)
def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) self.allow_new = kwargs.pop('allow_new', False) self.limit = kwargs.pop('limit', None) widget = kwargs.get('widget', self.widget) or self.widget if isinstance(widget, type): kwargs['widget'] = widget(lookup_class, allow_new=self.allow_new, limit=self.limit) super().__init__(*args, **kwargs)
def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) self.limit = kwargs.pop("limit", None) position = kwargs.pop("position", "bottom") attrs = {"data-selectable-multiple": "true", "data-selectable-position": position} attrs.update(kwargs.get("attrs", {})) query_params = kwargs.pop("query_params", {}) widgets = [ AutoComboboxWidget(lookup_class, allow_new=False, limit=self.limit, query_params=query_params, attrs=attrs), LookupMultipleHiddenInput(lookup_class), ] super(AutoComboboxSelectMultipleWidget, self).__init__(widgets, *args, **kwargs)
def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) self.allow_new = kwargs.pop('allow_new', False) self.limit = kwargs.pop('limit', None) query_params = kwargs.pop('query_params', {}) widgets = [ self.primary_widget( lookup_class, allow_new=self.allow_new, limit=self.limit, query_params=query_params, attrs=kwargs.get('attrs'), ), forms.HiddenInput(attrs={'data-selectable-type': 'hidden'}) ] super(_BaseSingleSelectWidget, self).__init__(widgets, *args, **kwargs)
def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) self.allow_new = kwargs.pop("allow_new", False) self.limit = kwargs.pop("limit", None) query_params = kwargs.pop("query_params", {}) widgets = [ self.primary_widget( lookup_class, allow_new=self.allow_new, limit=self.limit, query_params=query_params, attrs=kwargs.get("attrs"), ), forms.HiddenInput(attrs={"data-selectable-type": "hidden"}), ] super(_BaseSingleSelectWidget, self).__init__(widgets, *args, **kwargs)
def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) self.limit = kwargs.pop('limit', None) position = kwargs.pop('position', 'bottom') attrs = { 'data-selectable-multiple': 'true', 'data-selectable-position': position } attrs.update(kwargs.get('attrs', {})) query_params = kwargs.pop('query_params', {}) widgets = [ self.primary_widget( lookup_class, allow_new=False, limit=self.limit, query_params=query_params, attrs=attrs ), LookupMultipleHiddenInput(lookup_class) ] super(_BaseMultipleSelectWidget, self).__init__(widgets, *args, **kwargs)
def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) self.allow_new = kwargs.pop('allow_new', False) self.qs = kwargs.pop('query_params', {}) self.limit = kwargs.pop('limit', None) super(AutoCompleteWidget, self).__init__(*args, **kwargs)
def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) super(LookupMultipleHiddenInput, self).__init__(*args, **kwargs)
def __init__(self, lookup_class, *args, **kwargs): self.lookup_class = import_lookup_class(lookup_class) super().__init__(*args, **kwargs)