Ticket #1108: defaultFilters.diff
File defaultFilters.diff, 804 bytes (added by , 19 years ago) |
---|
-
core/template/defaultfilters.py
226 226 except IndexError: 227 227 return '' 228 228 229 def in_(value, arg): 230 """ 231 Returns True if `a` is found in list `b`. False if not found. 232 {{ a|in:b }} 233 or 234 {{ isThisValue|in:thisListOfValues }} 235 """ 236 return value in arg 237 229 238 def join(value, arg): 230 239 "Joins a list with a string, like Python's ``str.join(list)``" 231 240 try: … … 443 452 register.filter(fix_ampersands) 444 453 register.filter(floatformat) 445 454 register.filter(get_digit) 455 register.filter('in', in_) 446 456 register.filter(join) 447 457 register.filter(length) 448 458 register.filter(length_is)