This isn't the normal way to create a filter. Filters are defined in
files that live inside the templatetags/ directory of an application.
What you are doing may or may not work, but if it works, it's more or
less by accident.
>
> @register.filter
> @stringfilter
> def tf( val ):
> return "ABC"
>
> But when I try to invoke the filter using the 'render_to_string'
> shortcut I get this error:
>
> Exception Type: TemplateSyntaxError
> Exception Value: Invalid filter: 'tf'
I would guess that this means you haven't loaded the templatetag file
into the template. Fix the filter creation so that it's done in the
normal way (in a file in templatetags/) and, if you are still having
trouble, post the template you are trying to use it in.
Regards,
Malcolm
--
A clear conscience is usually the sign of a bad memory.
http://www.pointy-stick.com/blog/