How can I make a field on a ModelView
readonly?
class MyModelView(BaseModelView):
column_list = ('name', 'last_name', 'email')
If you're talking about Flask-Admin with SQLAlchemy Models, and you're declaring a view by inheriting from sqlamodel.ModelView, you can just add this to your class definition:
class MyModelView(BaseModelView):
column_list = ('name', 'last_name', 'email')
form_widget_args = {
'email':{
'disabled':True
}
}