I want to define the simplest possible filter and then invoke it from my simplest possible template, however I am beset by some problems:
I'm defining filters thus - this code is at the top of the same .py file as where I invoke the register_to_string method. @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' But when I inspect the library object in PDB it appears that all is well: (Pdb) register <django.template.Library object at 0x01AAB930> (Pdb) register.filters {'tf': <function tf at 0x01AB03F0>, 'render_object_to_string': <function render_object_to_string at 0x01AB04B0>, 'e repr': <function erepr at 0x01AB0470>} (Pdb) c Is there some extra trick I need to do in order to make my additional filters work with the render_to_string shortcut? THANKS --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---