> I don't think it is enough to check callables in __dict__. You may have
> imported some functions or other callable items in jinja_filters.py.
> And you also have to have an (empty) __init__.py in templatetools to get
> everything working.

You are right, checking for callables is not enough, but after all a
filter is just a function, even if you can decorate them with
@contextfilter and whatnot, thus the most sensible option (in my
opinion) is to have everybody use __all__. Some times you don't import
anything or have global functions (like when creating simple string
filters), thus maybe using __all__ would not be necessary, the
namespace will not be polluted in this specific case.

You need to have the __init__.py as templatetools acts as a module and
that is the pythonic way, same as controllers is a module (has an
__init__.py) even tough we only use the submodules (such as root.py).

Regards,
Carlos Daniel Ruvalcaba Valenzuela

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to