{# Import this module with context: {% import "widgets/tag_selector.html" as widget_tag_selector with context %} This is necessary because it uses global names from context processors. #} {% macro tag_selector(field) %} {% set all_tags = db_all_tags() %} {# When Javascript is disabled, we use the text field directly #}