def get_entity_definition(self, entity_definition_keyname):
        """
        Returns entity_definition.

        """
        if entity_definition_keyname:
            if type(entity_definition_keyname) is not list:
                entity_definition_keyname = [entity_definition_keyname]

        sql = """
            SELECT
                keyname,
                open_after_add,
                ordinal,
                actions_add
            FROM
                entity_definition
            WHERE keyname IN (%s);
        """  % ','.join(['\'%s\'' % x for x in map(str, entity_definition_keyname)])
        # logging.debug(sql)

        defs = []
        for d in self.db_query(sql):
            defs.append({
                'keyname': d.get('keyname'),
                'label': self.__get_system_translation(field='label', entity_definition_keyname=d.get('keyname')),
                'label_plural': self.__get_system_translation(field='label_plural', entity_definition_keyname=d.get('keyname')),
                'description': self.__get_system_translation(field='description', entity_definition_keyname=d.get('keyname')),
                'menugroup': self.__get_system_translation(field='menu', entity_definition_keyname=d.get('keyname')),
                'open_after_add': d.get('open_after_add'),
                'ordinal': d.get('ordinal'),
                'actions_add': d.get('actions_add')
            })

        return defs
dataset/ETHPy150Open argoroots/Entu/app/main/db.py/Entity.get_entity_definition/original