Closed hooli closed 11 years ago
Didn't know that about os.path.__name__
. I agree that modules are quite useless in the filters. But instead of renaming os.path.__name__
to ospath
I set it to os.path
(with a dot) just as the real module.
Cheers. Yep probably best to keep the same namespace. Considering that, and the fact you've made it dynamic, could have a config setting to let the user define extra imports. Probably on the todo list #166
Hi @posativ
The os.path name changes depending on platform ( posixpath , ntpath, riscospath ), so had to use posixpath.basename. Also unsure if modules are much using in the filters, since referencing them in a template will just cause a stack trace.
How about: