Commit 4b988dbd by Michael DeHaan

Merge pull request #2978 from bryanlarsen/basename

add basename and dirname to the core jinja2 filters
parents 27236cf5 f629baef
......@@ -17,6 +17,7 @@
import base64
import json
import os.path
import yaml
def to_nice_yaml(*a, **kw):
......@@ -45,5 +46,9 @@ class FilterModule(object):
'to_yaml': yaml.safe_dump,
'to_nice_yaml': to_nice_yaml,
'from_yaml': yaml.safe_load,
# path
'basename': os.path.basename,
'dirname': os.path.dirname,
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment