Hello, Using Pyramid I would like to filter expression that evaluate to None to be output as an empty string instead of "None". I have made a filter: def none_escape(value): """ Returns empty string if value is None - used as Mako filter. """ return value if value is not None else ''
and added the imports line to development.ini: mako.imports = from sales.lib.helpers import none_escape but when I add the filter to the default filters like this (because I still want the default html filter as well): mako.default_filters = h, none_escape I get the error: NameError: global name 'h' is not defined This only happens when I add ", none_escape" to the default filters line. It works with just "h" and the above imports line. Is this a bug I should be submitting, or am I missing something trivial here? Thanks, Jason -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/iYHqjLOvllcJ. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.