django

A simple django basename template filter tag

Last updated on Thu, 2009-04-16 13:52. Originally submitted by fabio on 2008-08-29 12:42.

I'm using Django, a python coded framework to develop web applications, to implement a project for the University.

During the development I needed to have a template tag which, given a path to a file, just returns its basename (just as it do the python os.path.basename).

So I implemented it. Following you have the code for it.