X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/cec32849d48d9e36c030224e2eb9631d31ef17a2..0959d38b27c03863ec376839dcc6d896d04e36ea:/philo/templatetags/embed.py diff --git a/philo/templatetags/embed.py b/philo/templatetags/embed.py index eb4cd68..9599240 100644 --- a/philo/templatetags/embed.py +++ b/philo/templatetags/embed.py @@ -1,7 +1,12 @@ +""" +The embed template tags are automatically included as builtins if :mod:`philo` is an installed app. + +""" from django import template -from django.contrib.contenttypes.models import ContentType from django.conf import settings +from django.contrib.contenttypes.models import ContentType from django.template.loader_tags import ExtendsNode, BlockContext, BLOCK_CONTEXT_KEY, TextNode, BlockNode + from philo.utils import LOADED_TEMPLATE_ATTR @@ -286,11 +291,23 @@ def parse_content_type(bit, tagname): return ct -def do_embed(parser, token): +@register.tag +def embed(parser, token): """ - The {% embed %} tag can be used in two ways: - {% embed . with