fnp
/
audio.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
paths
[audio.git]
/
src
/
youtube
/
templatetags
/
youtube.py
1
import django.template
2
3
4
register = django.template.Library()
5
6
7
@register.simple_tag
8
def last_name(author):
9
# TODO: we should reference the Catalogue to get proper last name.
10
if author.lower() == 'autor nieznany':
11
return
12
parts = author.split(' ')
13
for part in reversed(parts):
14
if part.startswith('('): continue
15
return part