More tweaks for python 3
This commit is contained in:
parent
b0821e8011
commit
17d99e16b9
8 changed files with 35 additions and 17 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2017 Lance Edgar
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -27,7 +27,7 @@ Core Grid Classes
|
|||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import datetime
|
||||
import urllib
|
||||
from six.moves import urllib
|
||||
|
||||
import six
|
||||
import sqlalchemy as sa
|
||||
|
@ -911,8 +911,12 @@ class Grid(object):
|
|||
"""
|
||||
Returns the rendered contents of the 'actions' column for a given row.
|
||||
"""
|
||||
main_actions = filter(None, [self.render_action(a, row, i) for a in self.main_actions])
|
||||
more_actions = filter(None, [self.render_action(a, row, i) for a in self.more_actions])
|
||||
main_actions = [self.render_action(a, row, i)
|
||||
for a in self.main_actions]
|
||||
main_actions = [a for a in main_actions if a]
|
||||
more_actions = [self.render_action(a, row, i)
|
||||
for a in self.more_actions]
|
||||
more_actions = [a for a in more_actions if a]
|
||||
if more_actions:
|
||||
icon = HTML.tag('span', class_='ui-icon ui-icon-carat-1-e')
|
||||
link = tags.link_to("More" + icon, '#', class_='more')
|
||||
|
@ -1072,5 +1076,5 @@ class URLMaker(object):
|
|||
params = self.request.GET.copy()
|
||||
params["page"] = page
|
||||
params["partial"] = "1"
|
||||
qs = urllib.urlencode(params, True)
|
||||
qs = urllib.parse.urlencode(params, True)
|
||||
return '{}?{}'.format(self.request.path, qs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue