Add "generic" render_id_str()
method to MasterView
not sure how useful, but maybe
This commit is contained in:
parent
eaeda6ca36
commit
13802c49a8
|
@ -228,7 +228,7 @@ class BatchMasterView(MasterView):
|
||||||
|
|
||||||
g.set_enum('status_code', self.model_class.STATUS)
|
g.set_enum('status_code', self.model_class.STATUS)
|
||||||
|
|
||||||
g.set_renderer('id', self.render_batch_id)
|
g.set_renderer('id', self.render_id_str)
|
||||||
|
|
||||||
g.set_link('id')
|
g.set_link('id')
|
||||||
g.set_link('description')
|
g.set_link('description')
|
||||||
|
@ -238,9 +238,6 @@ class BatchMasterView(MasterView):
|
||||||
g.set_label('rowcount', "Rows")
|
g.set_label('rowcount', "Rows")
|
||||||
g.set_label('status_code', "Status")
|
g.set_label('status_code', "Status")
|
||||||
|
|
||||||
def render_batch_id(self, batch, column):
|
|
||||||
return batch.id_str
|
|
||||||
|
|
||||||
def template_kwargs_index(self, **kwargs):
|
def template_kwargs_index(self, **kwargs):
|
||||||
route_prefix = self.get_route_prefix()
|
route_prefix = self.get_route_prefix()
|
||||||
if self.results_executable:
|
if self.results_executable:
|
||||||
|
|
|
@ -848,6 +848,12 @@ class MasterView(View):
|
||||||
'importer_host_title': importer_host_title,
|
'importer_host_title': importer_host_title,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def render_id_str(self, obj, field):
|
||||||
|
"""
|
||||||
|
Render the ``id_str`` attribute value for the given object.
|
||||||
|
"""
|
||||||
|
return obj.id_str
|
||||||
|
|
||||||
def render_default_phone(self, obj, field):
|
def render_default_phone(self, obj, field):
|
||||||
"""
|
"""
|
||||||
Render the "default" (first) phone number for the given contact.
|
Render the "default" (first) phone number for the given contact.
|
||||||
|
|
Loading…
Reference in a new issue