diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2016-09-02 07:54:55 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2016-09-02 07:54:55 -0500 |
commit | 7586aee42bc37432ad07638e254997540aa34007 (patch) | |
tree | a1cb328974ecefb78c99aca73dd2accf4f7d7861 /src/lib/Bcfg2/Reporting/templatetags | |
parent | d359bfdaa44078ae3040f4776c21896ff5205c12 (diff) | |
parent | b9006b325f7fd71bfe8329a5da4fb4862675b7dd (diff) | |
download | bcfg2-7586aee42bc37432ad07638e254997540aa34007.tar.gz bcfg2-7586aee42bc37432ad07638e254997540aa34007.tar.bz2 bcfg2-7586aee42bc37432ad07638e254997540aa34007.zip |
Merge branch 'fix/django1.9/url-tags' of https://github.com/AlexanderS/bcfg2
Diffstat (limited to 'src/lib/Bcfg2/Reporting/templatetags')
-rw-r--r-- | src/lib/Bcfg2/Reporting/templatetags/bcfg2_compat.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Reporting/templatetags/bcfg2_compat.py b/src/lib/Bcfg2/Reporting/templatetags/bcfg2_compat.py new file mode 100644 index 000000000..da4c73745 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templatetags/bcfg2_compat.py @@ -0,0 +1,14 @@ +from django.template import Library + +try: + from django.templatetags.future import url as django_url +except ImportError: + # future is removed in django 1.9 + from django.template.defaulttags import url as django_url + +register = Library() + + +@register.tag +def url(parser, token): + return django_url(parser, token) |