X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/ac6ebd8b38a46afb0b249574be71a276f95b6efa..46997a51ed0ceb16ddbac712fbcb552a86cdc9e2:/philo/templatetags/collections.py diff --git a/philo/templatetags/collections.py b/philo/templatetags/collections.py index 80dc20d..62d6138 100644 --- a/philo/templatetags/collections.py +++ b/philo/templatetags/collections.py @@ -1,3 +1,19 @@ +""" +The collection template tags are automatically included as builtins if :mod:`philo` is an installed app. + +.. templatetag:: membersof + +membersof +--------- + +Given a collection and a content type, sets the results of :meth:`collection.members.with_model <.CollectionMemberManager.with_model>` as a variable in the context. + +Usage:: + + {% membersof with . as %} + +""" + from django import template from django.conf import settings from django.contrib.contenttypes.models import ContentType @@ -23,9 +39,7 @@ class MembersofNode(template.Node): def do_membersof(parser, token): """ - Usage:: - - {% membersof with . as %} + {% membersof with . as %} """ params=token.split_contents()