def get_actions(include_admin_actions=False): serialized_actions = [] for action in actions.by_name: if actions.by_name[action].admin_only and not include_admin_actions: continue serialized_actions.append({ 'name': action, 'summary': actions.get_summary(actions.by_name[action]), 'description': actions.by_name[action].description }) return serialized_actions
def get_actions(include_admin_actions=False): serialized_actions = [] for action in actions.by_name: serialized_actions.append({ "name": action, "summary": actions.get_summary(actions.by_name[action]), "description": actions.by_name[action].description, }) return serialized_actions