def search_by_name(cls, query, name):
        """
        Make a search
        :param query:
        :param name:
        :return:
        """
        query = query.filter(db.or_(cls.first_name.contains(name),
                                    cls.last_name.contains(name)))
        return query
def search_by_name ( cls , query , name ) : query = query . filter ( db . or_ ( cls . first_name . contains ( name ) , cls . last_name . contains ( name ) ) ) return query
Make a search
        :param query:
        :param name:
        :return: