From 17e82da27c3b2de8a6ab4b2e745122c1b3e541c6 Mon Sep 17 00:00:00 2001 From: Stephen Burrows Date: Mon, 27 Jun 2011 12:27:02 -0400 Subject: [PATCH] Removed template container discovery in favor of (potentially) larger queries. --- philo/templatetags/containers.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/philo/templatetags/containers.py b/philo/templatetags/containers.py index 11ccd88..c9ef2a0 100644 --- a/philo/templatetags/containers.py +++ b/philo/templatetags/containers.py @@ -47,12 +47,8 @@ class ContainerNode(template.Node): except KeyError: return settings.TEMPLATE_STRING_IF_INVALID - contentlet_specs, contentreference_specs = page.template.containers - contentlets = page.contentlets.filter(name__in=contentlet_specs) - q = Q() - for name, ct in contentreference_specs.items(): - q |= Q(name=name, content_type=ct) - references = page.contentreferences.filter(q) + contentlets = page.contentlets.all() + references = page.contentreferences.all() container_context = ContainerContext(contentlets, references) context.render_context[CONTAINER_CONTEXT_KEY] = container_context -- 2.20.1