Permalink
Browse files

0.1.4

  • Loading branch information...
1 parent adec3c3 commit a49c04719361ec4d7ea748d96b1d53d0f3537382 @paltman paltman committed Nov 1, 2011
Showing with 10 additions and 6 deletions.
  1. +6 −0 docs/changelog.rst
  2. +1 −1 marturion/__init__.py
  3. +3 −5 marturion/templatetags/marturion_tags.py
View
6 docs/changelog.rst
@@ -3,6 +3,12 @@
ChangeLog
=========
+0.1.4
+-----
+
+- Fixed bug introduction with last bug fix.
+
+
0.1.3
-----
View
2 marturion/__init__.py
@@ -1 +1 @@
-__version__ = "0.1.3"
+__version__ = "0.1.4"
View
8 marturion/templatetags/marturion_tags.py
@@ -19,7 +19,7 @@ def handle_token(cls, parser, token, order_by, **kwargs):
raise template.TemplateSyntaxError("Second argument to %r must be "
"'as'" % bits[0])
- return cls(bits[2], bits[3], order_by)
+ return cls(parser.compile_filter(bits[1]), bits[3], order_by)
def __init__(self, how_many, context_var, order_by):
self.how_many = how_many
@@ -28,14 +28,12 @@ def __init__(self, how_many, context_var, order_by):
def render(self, context):
how_many = self.how_many.resolve(context)
- context[self.context_var] = [
- t
- for t in Testimonial.objects.filter(
+ context[self.context_var] = list(Testimonial.objects.filter(
active=True
).order_by(
self.order_by
)[:how_many]
- ]
+ )
return u""

0 comments on commit a49c047

Please sign in to comment.