Ticket #15732: 15732_stringfilter_doc_example_r15965.diff

File 15732_stringfilter_doc_example_r15965.diff, 457 bytes (added by Antti Kaihola, 7 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:: 
    115115    from django.template.defaultfilters import stringfilter
     117    @register.filter
    117118    @stringfilter
    118119    def lower(value):
    119120        return value.lower()
Back to Top