@register.inclusion_tag('addons/tags_box.html')
@jinja2.contextfunction
def tags_box(context, addon, tags=None):
 c = dict(context.items())
 c.update({'addon': addon, 'tags': tags})
 return c

@ register . inclusion_tag ( 'addons/tags_box.html' ) @ jinja2 . contextfunction def tags_box ( context , addon , tags = None ) : c = dict ( context . items ( ) ) c . update ( { 'addon' : addon , 'tags' : tags } ) return c
details page: show a box with existing tags along with a form to add new ones .