register = template.Library()
-@register.simple_tag
-def multiple_tags_table(tags):
- return template.loader.render_to_string(
- "archive/tags/multiple_tags_table.html",
- {"tags": tags}
- )
+@register.inclusion_tag('archive/tags/multiple_tags_table.html')
+def multiple_tags_table(tags, table=True):
+ return locals()
-#@register.simple_tag
-#def multiple_tags_table(tags):
-# return template.loader.render_to_string(
-# "archive/tags/multiple_tags_table.html",
-# {"tags": tags}
-# )
-
+@register.inclusion_tag('archive/tags/tags_table.html')
+def tags_table(tags, table=True):
+ return locals()