Remove unused templatetags

This commit is contained in:
Mouse Reeve 2020-09-30 11:47:52 -07:00
parent 2b710c44e4
commit 3e65d53305
3 changed files with 3 additions and 31 deletions

View file

@ -6,7 +6,7 @@
{% if author.bio %}
<p>
{{ author.bio | author_bio }}
{{ author.bio }}
</p>
{% endif %}
</div>

View file

@ -1,7 +1,6 @@
{% load fr_display %}
{% if book.description %}
<blockquote class="content">{{ book.description | description }}</blockquote>
<blockquote class="content">{{ book.description }}</blockquote>
{% elif book.parent_work.description %}
<blockquote>{{ book.parent_work.description | description }}</blockquote>
<blockquote>{{ book.parent_work.description }}</blockquote>
{% endif %}

View file

@ -25,27 +25,6 @@ def get_rating(book, user):
return 0
@register.filter(name='description')
def description_format(description):
''' handle the various OL description formats '''
if not description:
return ''
if '----------' in description:
description = description.split('----------')[0]
return description.strip()
@register.filter(name='author_bio')
def bio_format(bio):
''' clean up OL author bios '''
if isinstance(bio, dict) and 'value' in bio:
bio = bio['value']
bio = bio.split('\n')
return bio[0].strip()
@register.filter(name='username')
def get_user_identifier(user):
''' use localname for local users, username for remote '''
@ -67,12 +46,6 @@ def get_replies(status):
).select_subclasses().all()[:10]
@register.filter(name='reply_count')
def get_reply_count(status):
''' how many replies does a status have? '''
return models.Status.objects.filter(reply_parent=status).count()
@register.filter(name='parent')
def get_parent(status):
''' get the reply parent for a status '''