aboutsummaryrefslogtreecommitdiffstats
path: root/ryuslash/aggregator/templatetags/posts_extras.py
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-05-09 21:25:06 +0200
committerGravatar Tom Willemse2013-05-09 21:25:06 +0200
commitc4684123b3323a9a61fe1eea5b3228086bfcb8ee (patch)
tree705c842ce466cdb1f8fe7e4190b11aa967f59fb4 /ryuslash/aggregator/templatetags/posts_extras.py
parentc413a73eebdb41b1085bc690d30a475b9da1316e (diff)
downloadryuslash.org-c4684123b3323a9a61fe1eea5b3228086bfcb8ee.tar.gz
ryuslash.org-c4684123b3323a9a61fe1eea5b3228086bfcb8ee.zip
Tiny code cleanup
Diffstat (limited to 'ryuslash/aggregator/templatetags/posts_extras.py')
-rw-r--r--ryuslash/aggregator/templatetags/posts_extras.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ryuslash/aggregator/templatetags/posts_extras.py b/ryuslash/aggregator/templatetags/posts_extras.py
index 64718a2..ae68483 100644
--- a/ryuslash/aggregator/templatetags/posts_extras.py
+++ b/ryuslash/aggregator/templatetags/posts_extras.py
@@ -5,10 +5,12 @@ from django.template.defaultfilters import stringfilter
register = template.Library()
+
@stringfilter
def nameless(value):
return re.sub(r'(^|by[- ])(ryuslash|tom)[- ]?', '', value)
+
@stringfilter
def truncate(value, length):
if len(value) > length: