improve placeholder on login template

This commit is contained in:
Jens Langhammer
2019-02-25 19:43:33 +01:00
parent 9d344d887c
commit f2569b6424
4 changed files with 17 additions and 3 deletions

7
passbook/lib/utils/ui.py Normal file
View File

@ -0,0 +1,7 @@
"""passbook UI utils"""
def human_list(_list) -> str:
"""Convert a list of items into 'a, b or c'"""
last_item = _list.pop()
result = ', '.join(_list)
return '%s or %s' % (result, last_item)