One useful Django template tag is to retrieve the template filename from inside the template. Unfortunately, Django built in tags do not provide one for this. However, you can write a simple tag to accomplish this. Here's are two tags, that return either the base filename or the full filename …