tags_input.widgets module

class tags_input.widgets.AdminTagsInputWidget(verbose_name, is_stacked, attrs=None, choices=())[source]

Bases: django.contrib.admin.widgets.FilteredSelectMultiple, tags_input.widgets.TagsInputWidgetBase

class Media[source]
css = {'all': ('jquery-tagsinput-revisited-2.0/dist/jquery.tagsinput-revisited.min.css', 'jquery-ui-1.12.1/jquery-ui.min.css')}
js = ('jquery-3.2.1.min.js', 'jquery-ui-1.12.1/jquery-ui.min.js', 'jquery-tagsinput-revisited-2.0/dist/jquery.tagsinput-revisited.min.js')
add_id_index = False
allow_multiple_selected = True
build_attrs(base_attrs, extra_attrs=None, **kwargs)

Compatibility function for the behavior changes in Django 1.11+

checked_attribute = {u'selected': True}
create_option(name, value, label, selected, index, subindex=None, attrs=None)
format_value(value)

Return selected values as a list.

get_context(name, value, attrs)
id_for_label(id_, index=u'0')

Use an incremented id for each option where the main widget references the zero index.

input_type = u'select'
is_hidden
is_localized = False
is_required = False
media
needs_multipart_form = False
optgroups(name, value, attrs=None)

Return a list of optgroups for this widget.

option_inherits_attrs = False
option_template_name = u'django/forms/widgets/select_option.html'
options(name, value, attrs=None)

Yield a flat list of options for this widgets.

render(name, value, attrs=None, choices=(), renderer=None)
subwidgets(name, value, attrs=None)

Yield all “subwidgets” of this widget. Used to enable iterating options from a BoundField for choice widgets.

supports_microseconds = True
template_name = u'django/forms/widgets/select.html'
use_required_attribute(initial)

Don’t render ‘required’ if the first <option> has a value, as that’s invalid HTML.

value_from_datadict(data, files, name)
value_omitted_from_data(data, files, name)
class tags_input.widgets.TagsInputWidget(on_add_tag=None, on_remove_tag=None, on_change_tag=None, *args, **kwargs)[source]

Bases: tags_input.widgets.TagsInputWidgetBase

class Media[source]
css = {'all': ('jquery-tagsinput-revisited-2.0/dist/jquery.tagsinput-revisited.min.css', 'jquery-ui-1.12.1/jquery-ui.min.css')}
enable_jquery = True
js = ('jquery-3.2.1.min.js', 'jquery-ui-1.12.1/jquery-ui.min.js', 'jquery-tagsinput-revisited-2.0/dist/jquery.tagsinput-revisited.min.js')
add_id_index = False
allow_multiple_selected = True
build_attrs(base_attrs, extra_attrs=None, **kwargs)

Compatibility function for the behavior changes in Django 1.11+

checked_attribute = {u'selected': True}
create_option(name, value, label, selected, index, subindex=None, attrs=None)
format_value(value)

Return selected values as a list.

get_context(name, value, attrs)
id_for_label(id_, index=u'0')

Use an incremented id for each option where the main widget references the zero index.

input_type = u'select'
is_hidden
is_localized = False
is_required = False
media
needs_multipart_form = False
optgroups(name, value, attrs=None)

Return a list of optgroups for this widget.

option_inherits_attrs = False
option_template_name = u'django/forms/widgets/select_option.html'
options(name, value, attrs=None)

Yield a flat list of options for this widgets.

render(name, value, attrs=None, choices=(), renderer=None)
subwidgets(name, value, attrs=None)

Yield all “subwidgets” of this widget. Used to enable iterating options from a BoundField for choice widgets.

supports_microseconds = True
template_name = u'django/forms/widgets/select.html'
use_required_attribute(initial)

Don’t render ‘required’ if the first <option> has a value, as that’s invalid HTML.

value_from_datadict(data, files, name)
value_omitted_from_data(data, files, name)
class tags_input.widgets.TagsInputWidgetBase(on_add_tag=None, on_remove_tag=None, on_change_tag=None, *args, **kwargs)[source]

Bases: django.forms.widgets.SelectMultiple

add_id_index = False
allow_multiple_selected = True
build_attrs(base_attrs, extra_attrs=None, **kwargs)[source]

Compatibility function for the behavior changes in Django 1.11+

checked_attribute = {u'selected': True}
create_option(name, value, label, selected, index, subindex=None, attrs=None)
format_value(value)

Return selected values as a list.

get_context(name, value, attrs)
id_for_label(id_, index=u'0')

Use an incremented id for each option where the main widget references the zero index.

input_type = u'select'
is_hidden
is_localized = False
is_required = False
media
needs_multipart_form = False
optgroups(name, value, attrs=None)

Return a list of optgroups for this widget.

option_inherits_attrs = False
option_template_name = u'django/forms/widgets/select_option.html'
options(name, value, attrs=None)

Yield a flat list of options for this widgets.

render(name, value, attrs=None, choices=(), renderer=None)[source]
subwidgets(name, value, attrs=None)

Yield all “subwidgets” of this widget. Used to enable iterating options from a BoundField for choice widgets.

supports_microseconds = True
template_name = u'django/forms/widgets/select.html'
use_required_attribute(initial)

Don’t render ‘required’ if the first <option> has a value, as that’s invalid HTML.

value_from_datadict(data, files, name)[source]
value_omitted_from_data(data, files, name)