summaryrefslogtreecommitdiff
path: root/chimere/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/views.py')
-rw-r--r--chimere/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/chimere/views.py b/chimere/views.py
index 1b17189..b9f03f5 100644
--- a/chimere/views.py
+++ b/chimere/views.py
@@ -28,15 +28,15 @@ import re
from django.conf import settings
from django.contrib.gis.geos import GEOSGeometry, Polygon as GEOSPolygon
-from django.contrib.gis.gdal.error import OGRException
+from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.measure import D
from django.contrib.sites.shortcuts import get_current_site
from django.core.exceptions import ObjectDoesNotExist
-from django.core.urlresolvers import reverse
from django.db.models import Q
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.shortcuts import get_object_or_404, redirect, render
from django.template import defaultfilters
+from django.urls import reverse
from django.utils.http import urlquote
from django.utils.translation import ugettext as _
from django.views.generic import TemplateView, ListView, FormView
@@ -1204,7 +1204,7 @@ def route(request, area_name, lon1, lat1, lonlat_steps, lon2, lat2,
try:
route = GEOSGeometry(jsonencoder.encode(
jsondecoder.decode(jsons[0])['geometry']))
- except OGRException:
+ except GDALException:
return HttpResponse(_("Bad geometry"), status=500)
cats = models.SubCategory.objects.filter(routing_warn=True)
message = ''