How can I filter a column in the edit form with Flask-Admin ModelView?
问题 I am using a model view with flask-admin and I want to filter a column in the edit/create view. The column/field is a relationship and I only want to show fields that belong to the logged in user i.e. relationship_id == user.id 回答1: Actually I found a easier way for that as below, seems there's no need to override the edit_form method in ModelView, just pass the filtering function as a named parameter(query_factory) to the form_args, and it works like a charming!. class CustomModelView