@expose("<STR_LIT>", methods=["<STR_LIT:GET>"])<EOL><INDENT>def action(self, name, pk):<DEDENT>
pk = self._deserialize_pk_if_composite(pk)<EOL>if self.appbuilder.sm.has_access(name, self.__class__.__name__):<EOL><INDENT>action = self.actions.get(name)<EOL>return action.func(self.datamodel.get(pk))<EOL><DEDENT>else:<EOL><INDENT>flash(as_unicode(FLAMSG_ERR_SEC_ACCESS_DENIED), "<STR_LIT>")<EOL>return redirect("<STR_LIT:.>")<EOL><DEDENT>
Action method to handle actions from a show view