Skip to main content

A Jinja2 extension that introduces the template filters basename and dirname.

Project description

A Jinja2 extension that introduces the template filters basename and dirname.

Examples

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

Will fill in 'file.txt'.

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

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

Project details


Download files

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

Files for jinja2-ospath, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size jinja2_ospath-0.3.0-py2.py3-none-any.whl (2.5 kB) File type Wheel Python version 3.6 Upload date Hashes View
Filename, size jinja2_ospath-0.3.0.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page