diff options
author | Tom Willemse | 2013-05-09 21:25:06 +0200 |
---|---|---|
committer | Tom Willemse | 2013-05-09 21:25:06 +0200 |
commit | c4684123b3323a9a61fe1eea5b3228086bfcb8ee (patch) | |
tree | 705c842ce466cdb1f8fe7e4190b11aa967f59fb4 /ryuslash/aggregator/templatetags/posts_extras.py | |
parent | c413a73eebdb41b1085bc690d30a475b9da1316e (diff) | |
download | ryuslash.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.py | 2 |
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: |