X-Git-Url: https://git.mdrn.pl/django-ssify.git/blobdiff_plain/325450f83527058794f7b9f5e76348afa9a06ec4..refs/heads/master:/ssify/middleware_debug.py diff --git a/ssify/middleware_debug.py b/ssify/middleware_debug.py index b0a1e92..f463d53 100644 --- a/ssify/middleware_debug.py +++ b/ssify/middleware_debug.py @@ -12,10 +12,18 @@ support as a proxy (i.e. Nginx with ssi=on). """ from __future__ import unicode_literals import re + try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse + +try: + from django.urls import NoReverseMatch, reverse, resolve +except ImportError: + # Django < 2 + from django.core.urlresolvers import NoReverseMatch, reverse, resolve + from django.core.urlresolvers import resolve from .cache import get_caches