@register.simple_tag
def hook_output(hook_name):
 snippets = [fn() for fn in hooks.get_hooks(hook_name)]
 return mark_safe(u''.join(snippets))

@ register . simple_tag def hook_output ( hook_name ) : snippets = [ fn ( ) for fn in hooks . get_hooks ( hook_name ) ] return mark_safe ( u'' . join ( snippets ) )
example: {% hook_output insert_editor_css %} whenever we have a hook whose functions take no parameters and return a string .