forked from mirrors/bookwyrm
Remove unused templatetags
This commit is contained in:
parent
2b710c44e4
commit
3e65d53305
3 changed files with 3 additions and 31 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
{% if author.bio %}
|
{% if author.bio %}
|
||||||
<p>
|
<p>
|
||||||
{{ author.bio | author_bio }}
|
{{ author.bio }}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{% load fr_display %}
|
|
||||||
{% if book.description %}
|
{% if book.description %}
|
||||||
<blockquote class="content">{{ book.description | description }}</blockquote>
|
<blockquote class="content">{{ book.description }}</blockquote>
|
||||||
{% elif book.parent_work.description %}
|
{% elif book.parent_work.description %}
|
||||||
<blockquote>{{ book.parent_work.description | description }}</blockquote>
|
<blockquote>{{ book.parent_work.description }}</blockquote>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -25,27 +25,6 @@ def get_rating(book, user):
|
||||||
return 0
|
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')
|
@register.filter(name='username')
|
||||||
def get_user_identifier(user):
|
def get_user_identifier(user):
|
||||||
''' use localname for local users, username for remote '''
|
''' use localname for local users, username for remote '''
|
||||||
|
@ -67,12 +46,6 @@ def get_replies(status):
|
||||||
).select_subclasses().all()[:10]
|
).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')
|
@register.filter(name='parent')
|
||||||
def get_parent(status):
|
def get_parent(status):
|
||||||
''' get the reply parent for a status '''
|
''' get the reply parent for a status '''
|
||||||
|
|
Loading…
Reference in a new issue