How to edit flask-admin to support multi tenancy?
Remove the field from being displayed in the form, then hook into on_model_change:
class MyDealModelView(ModelView): form_excluded_columns = ('merchant_id',) def on_model_change(form, model, is_created): model.merchant_id = login.current_user.merchant_id;