archivebox.core.widgets

Module Contents

Classes

TagEditorWidget

A widget that renders tags as clickable pills with inline editing.

URLFiltersWidget

Render URL allowlist / denylist controls with same-domain autofill.

InlineTagEditorWidget

Inline version of TagEditorWidget for use in list views. Includes AJAX save functionality for immediate persistence.

API

class archivebox.core.widgets.TagEditorWidget(attrs=None, snapshot_id=None)[source]

Bases: django.forms.Widget

A widget that renders tags as clickable pills with inline editing.

  • Displays existing tags alphabetically as styled pills with X remove button

  • Text input with HTML5 datalist for autocomplete suggestions

  • Press Enter or Space to create new tags (auto-creates if doesn’t exist)

  • Uses AJAX for autocomplete and tag creation

Initialization

template_name = <Multiline-String>[source]
class Media[source]
css[source]

None

js[source]

[]

_escape(value)[source]

Escape HTML entities in value.

_normalize_id(value)[source]

Normalize IDs for HTML + JS usage (letters, digits, underscore; JS-safe start).

_json_for_inline_script(value)[source]

Serialize JSON so it cannot close the surrounding inline