'Renders the actions specified in ``Meta.row_actions``.
The actions are rendered using the current row data.
If `row` is True, the actions are rendered in a row
of buttons. Otherwise they are rendered in a dropdown box.'

def render_row_actions(self, datum, row=False):

    if row:
        template_path = self._meta.row_actions_row_template
    else:
        template_path = self._meta.row_actions_dropdown_template
    row_actions_template = template.loader.get_template(template_path)
    bound_actions = self.get_row_actions(datum)
    extra_context = {'row_actions': bound_actions, 'row_id': self.get_object_id(datum)}
    return row_actions_template.render(extra_context, self.request)
