Ticket #15732: 15732_stringfilter_doc_example_r15965.diff

File 15732_stringfilter_doc_example_r15965.diff, 457 bytes (added by akaihola, 4 years ago)

Adds the missing @register.filter decorator to the @stringfilter example

  • docs/howto/custom-template-tags.txt

    diff --git a/docs/howto/custom-template-tags.txt b/docs/howto/custom-template-tags.txt
    index 7dc6cce..d580eb3 100644
    a b convert an object to its string value before being passed to your function:: 
    114114
    115115    from django.template.defaultfilters import stringfilter
    116116
     117    @register.filter
    117118    @stringfilter
    118119    def lower(value):
    119120        return value.lower()
Back to Top