Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removing aggregator template tags.

They're no longer used.
  • Loading branch information...
commit e5cc13e5ef21a35ff0e58e3dde7bf86a329e3f9b 1 parent 8b64073
Justin Abrahms authored September 08, 2010
0  django_website/apps/aggregator/templatetags/__init__.py
No changes.
24  django_website/apps/aggregator/templatetags/aggregator.py
... ...
@@ -1,24 +0,0 @@
1  
-from django import template
2  
-from django_website.apps.aggregator.models import Feed
3  
-
4  
-class FeedListNode(template.Node):
5  
-    def __init__(self, varname):
6  
-        self.varname = varname
7  
-
8  
-    def render(self, context):
9  
-        context[self.varname] = Feed.objects.filter(is_defunct=False)
10  
-        return ''
11  
-
12  
-def do_get_feed_list(parser, token):
13  
-    """
14  
-    {% get_feed_list as feed_list %}
15  
-    """
16  
-    bits = token.contents.split()
17  
-    if len(bits) != 3:
18  
-        raise template.TemplateSyntaxError, "'%s' tag takes two arguments" % bits[0]
19  
-    if bits[1] != "as":
20  
-        raise template.TemplateSyntaxError, "First argument to '%s' tag must be 'as'" % bits[0]
21  
-    return FeedListNode(bits[2])
22  
-
23  
-register = template.Library()
24  
-register.tag('get_feed_list', do_get_feed_list)

0 notes on commit e5cc13e

Please sign in to comment.
Something went wrong with that request. Please try again.