Skip to content

Commit

Permalink
Suit compat module. parse_qs fix for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
darklow committed Feb 11, 2017
1 parent 7e010b8 commit 1c68348
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions suit/compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
try:
# Python 3.
from urllib.parse import parse_qs
except ImportError:
# Python 2.6+
from urlparse import parse_qs
3 changes: 1 addition & 2 deletions suit/templatetags/suit_list.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from copy import copy
from urlparse import parse_qs

from django import template
from django.template import Context
from django.template.loader import get_template
from django.utils.safestring import mark_safe
from django.contrib.admin.views.main import SEARCH_VAR
from suit.compat import parse_qs

register = template.Library()

Expand Down

0 comments on commit 1c68348

Please sign in to comment.