class MethodArgAjaxModelLoader(sqla.ajax.QueryAjaxModelLoader):

    def get_list(self, term, offset=0, limit=10):
        query = self.session.query(self.model).filter_by(mid=term)
return query.offset(offset).limit(limit).all()


class RecipeArgAdmin(sqla.ModelView):
    column_list = 'recipe', 'methodarg', 'strvalue'
form_ajax_refs = {'methodarg': MethodArgAjaxModelLoader('methodarg', db.
    session, MethodArg, fields=['methodarg'])}
column_editable_list = column_list
flask-admin form: Constrain Value of Field 2 depending on Value of Field 1