Django <2 is no longer supported

This commit is contained in:
Timothy Hobbs 2019-12-06 15:05:57 +01:00
parent d32d23e4e2
commit 3b5a7fe49a

View File

@ -7,12 +7,7 @@ views/public.py - All public facing views, eg non-staff (no authentication
required) views.
"""
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
try:
# Django 2.0+
from django.urls import reverse
except ImportError:
# Django < 2
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render
from django.utils.http import urlquote