Ticket #5567: filter-last.diff
File filter-last.diff, 886 bytes (added by , 17 years ago) |
---|
-
django/template/defaultfilters.py
433 433 return u'' 434 434 first.is_safe = True 435 435 436 437 def last(value): 438 "Returns the last item in a list" 439 try: 440 return value[-1] 441 except IndexError: 442 return u'' 443 last.is_safe = True 444 445 436 446 def join(value, arg): 437 447 """Joins a list with a string, like Python's ``str.join(list)``.""" 438 448 try: -
docs/templates.txt
1403 1403 1404 1404 Joins a list with a string, like Python's ``str.join(list)``. 1405 1405 1406 last 1407 ~~~~ 1408 1409 Returns the last item in a list. 1410 1406 1411 length 1407 1412 ~~~~~~ 1408 1413