Skip to main content

A Jinja2 extension that introduces the filters basename and dirname.

Project description

# Jinja2 os.path Filters

A Jinja2 extension that introduces the filters basename and dirname.

## Examples

`Python my_path = "/some/absolute/path/with/file.txt" {{ my_path | basename }} `

Will fill in file.txt.

`Python my_path = "/some/absolute/path/with/file.txt" {{ my_path | dirname }} `

Will fill in /some/absolute/path/with.

## Copyright and Licensing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jinja2_ospath-0.2.0.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

jinja2_ospath-0.2.0-py2.py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page