Commit 024fd1b2 authored by Dan McGee's avatar Dan McGee
Browse files

Remove cdnprefix template tag



Signed-off-by: default avatarDan McGee <dan@archlinux.org>
parent 9d011312
......@@ -53,7 +53,5 @@ SECRET_KEY = '00000000000000000000000000000000000000000000000'
## CDN settings
CDN_ENABLED = False
# Scheme-relative URL, should work for both http/https
CDN_PATH = '//example.com/path/'
# vim: set ts=4 sw=4 et:
......@@ -15,16 +15,4 @@ def jquery():
link = '%sjquery-%s.min.js' % (static_url, version)
return '<script type="text/javascript" src="%s"></script>' % link
@register.tag
def cdnprefix(parser, token):
return CDNPrefixNode()
class CDNPrefixNode(template.Node):
def render(self, context):
oncdn = getattr(settings, 'CDN_ENABLED', True)
if not oncdn:
return ''
# if left undefined, same behavior as if CDN is turned off
return getattr(settings, 'CDN_PATH', '')
# 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