More python 3 tweaks
This commit is contained in:
parent
f411dcde24
commit
2ab00bfd78
|
@ -531,7 +531,7 @@ class BatchMasterView(MasterView):
|
|||
def make_batch_row_grid_tools(self, batch):
|
||||
if self.rows_bulk_deletable and not batch.executed and self.request.has_perm('{}.delete_rows'.format(self.get_permission_prefix())):
|
||||
url = self.request.route_url('{}.delete_rows'.format(self.get_route_prefix()), uuid=batch.uuid)
|
||||
return HTML.tag('p', c=tags.link_to("Delete all rows matching current search", url))
|
||||
return HTML.tag('p', c=[tags.link_to("Delete all rows matching current search", url)])
|
||||
|
||||
def make_row_grid_tools(self, batch):
|
||||
return (self.make_default_row_grid_tools(batch) or '') + (self.make_batch_row_grid_tools(batch) or '')
|
||||
|
|
|
@ -746,6 +746,9 @@ class MasterView(View):
|
|||
return self.redirect(self.request.current_route_url(_query=None))
|
||||
|
||||
if self.request.params.get('partial'):
|
||||
if six.PY3:
|
||||
self.request.response.content_type = 'text/html'
|
||||
else:
|
||||
self.request.response.content_type = b'text/html'
|
||||
self.request.response.text = grid.render_grid()
|
||||
return self.request.response
|
||||
|
|
Loading…
Reference in a new issue