From 0112ff59f8afaec35985bf02032bf482ba231bc9 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 22 Aug 2017 14:13:21 -0500 Subject: [PATCH] use urlencode from django.utils.http (#760) This works across django versions from at least version 1.7 and is compatible across python versions. https://docs.djangoproject.com/en/1.8/ref/utils/#django.utils.http.urlencode --- django_filters/widgets.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/django_filters/widgets.py b/django_filters/widgets.py index 779567a63..333af08a7 100644 --- a/django_filters/widgets.py +++ b/django_filters/widgets.py @@ -3,10 +3,7 @@ from collections import Iterable from itertools import chain -try: - from urllib.parse import urlencode -except: - from urllib import urlencode # noqa +from django.utils.http import urlencode import django from django import forms