Ticket #1162: defaultfilters.diff
File defaultfilters.diff, 700 bytes (added by , 19 years ago) |
---|
-
defaultfilters.py
433 433 from pprint import pformat 434 434 return pformat(value) 435 435 436 def range0(value): 437 "A python style range() function, 0-index" 438 return range(value) 439 440 def range1(value): 441 "A python style range() function, 1-index" 442 return range(1, value + 1) 443 436 444 # Syntax: register.filter(name of filter, callback) 437 445 register.filter(add) 438 446 register.filter(addslashes) … … 482 490 register.filter(wordcount) 483 491 register.filter(wordwrap) 484 492 register.filter(yesno) 493 register.filter(range0) 494 register.filter(range1)