Permalink
Browse files

Fixed #18. Removed the use of decorators in templatetags.

git-svn-id: file:///Users/brian/Backups/S3/backups/Wednesday/brian/svn/djog/trunk@57 95ab7de8-677b-4562-a266-b8acc9dd993c
  • Loading branch information...
brosner committed Oct 24, 2007
1 parent 5487aa6 commit 3f4737b6c3d1ff425951688155da3242bf4936fc
Showing with 4 additions and 4 deletions.
  1. +4 −4 djog/templatetags/filters.py
@@ -4,20 +4,20 @@
register = template.Library()
-@register.inclusion_tag('tags.html')
def show_tags():
tags = Tag.objects.all().order_by('tag')
return {'tags': tags}
+register.inclusion_tag('tags.html')(show_tags)
-@register.inclusion_tag('monthly.html')
def show_archive():
months = Entry.objects.dates('pub_date', "month")
counts = []
for month in months:
count = Entry.objects.filter(pub_date__month=month.month).count()
counts.append((month, count))
return {'counts': counts}
+register.inclusion_tag('monthly.html')(show_archive)
-@register.filter
def searchify(term):
- return "search/%s/" % term
+ return "search/%s/" % term
+register.filter('searchify', searchify)

0 comments on commit 3f4737b

Please sign in to comment.