Changeset 4559
- Timestamp:
- 02/23/07 14:50:53 (2 years ago)
- Files:
-
- django/trunk/docs/templates_python.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/templates_python.txt
r4558 r4559 658 658 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 659 659 If you are writing a template filter which only expects a string as the first 660 argument, you should use the included decorator `` to_str`` which will convert660 argument, you should use the included decorator ``stringfilter`` which will convert 661 661 an object to it's string value before being passed to your function:: 662 662 663 from django import template 664 665 @template.stringfilter 663 666 def lower(value): 664 667 return value.lower() 665 lower = template.to_str(lower)666 668 667 669 Writing custom template tags
