diff options
author | Angel Velásquez <angvp@archlinux.org> | 2017-07-03 12:45:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-03 12:45:19 -0400 |
commit | 21722cc031f1ac9ba44e23c12c92aa385e9576d0 (patch) | |
tree | ea403b3070f88fd95eb5534068d4a4750f74cce9 | |
parent | 3d928d7768f377a45e5ddea34c906eda8a4890f8 (diff) | |
parent | 700afd84c02afaa77e5a4a058319292f1a387baf (diff) | |
download | archweb-21722cc031f1ac9ba44e23c12c92aa385e9576d0.tar.gz archweb-21722cc031f1ac9ba44e23c12c92aa385e9576d0.zip |
Merge pull request #45 from jelly/remove_cdn
Remove CDN configuration option
-rw-r--r-- | local_settings.py.example | 3 | ||||
-rw-r--r-- | main/templatetags/cdn.py | 10 |
2 files changed, 2 insertions, 11 deletions
diff --git a/local_settings.py.example b/local_settings.py.example index d5c20063..b4132981 100644 --- a/local_settings.py.example +++ b/local_settings.py.example @@ -53,7 +53,4 @@ MEDIA_URL = '/media/img/' ## Make this unique, and don't share it with anybody. SECRET_KEY = '00000000000000000000000000000000000000000000000' -## CDN settings -CDN_ENABLED = False - # vim: set ts=4 sw=4 et: diff --git a/main/templatetags/cdn.py b/main/templatetags/cdn.py index fc63fdd8..e0b702be 100644 --- a/main/templatetags/cdn.py +++ b/main/templatetags/cdn.py @@ -1,5 +1,4 @@ from django import template -from django.conf import settings from django.contrib.staticfiles.storage import staticfiles_storage register = template.Library() @@ -8,13 +7,8 @@ register = template.Library() @register.simple_tag def jquery(): version = '1.8.3' - oncdn = getattr(settings, 'CDN_ENABLED', True) - if oncdn: - link = 'https://ajax.googleapis.com/ajax/libs/jquery/' \ - '%s/jquery.min.js' % version - else: - filename = 'jquery-%s.min.js' % version - link = staticfiles_storage.url(filename) + filename = 'jquery-%s.min.js' % version + link = staticfiles_storage.url(filename) return '<script type="text/javascript" src="%s"></script>' % link |