Django

Code

Changeset 4559

Show
Ignore:
Timestamp:
02/23/07 14:50:53 (2 years ago)
Author:
jacob
Message:

Fixed documentation from [4558] to be correct.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/templates_python.txt

    r4558 r4559  
    658658~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    659659If 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 convert 
     660argument, you should use the included decorator ``stringfilter`` which will convert 
    661661an object to it's string value before being passed to your function:: 
    662662 
     663    from django import template 
     664 
     665    @template.stringfilter 
    663666    def lower(value): 
    664667        return value.lower() 
    665     lower = template.to_str(lower) 
    666668 
    667669Writing custom template tags