Commit 5888bdf0 authored by Dan McGee's avatar Dan McGee
Browse files

Use staticfiles_storage in jQuery tag

To get the local URL to the jQuery JS file.

Signed-off-by: default avatarDan McGee <>
parent 99a0e1bc
from django import template
from django.conf import settings
from import staticfiles_storage
register = template.Library()
def jquery():
version = '1.4.4'
......@@ -11,8 +13,8 @@ def jquery():
link = '' \
'%s/jquery.min.js' % version
static_url = getattr(settings, 'STATIC_URL', '/static/')
link = '%sjquery-%s.min.js' % (static_url, version)
filename = 'jquery-%s.min.js' % version
link = staticfiles_storage.url(filename)
return '<script type="text/javascript" src="%s"></script>' % link
# vim: set ts=4 sw=4 et:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment