blob: c7fd9f0076833b24090f3f0cd763a946c2423411 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from django import template
from django.contrib.staticfiles.storage import staticfiles_storage
register = template.Library()
@register.simple_tag
def retro_static(year, path):
"""Like the built-in {% static %} tag but with a little extra magic."""
full_path = "%s/%s" % (year, path)
return staticfiles_storage.url(full_path)
# vim: set ts=4 sw=4 et:
|