Reason why it did not work - Flask-Admin was not able to figure out what to do with SynonymProperty, so it failed to generate form field.
There's a way you can have it working right now:
class UserAdmin(sqlamodel.ModelView):
searchable_columns = ('username', 'email')
excluded_list_columns = ['password']
list_columns = ('username', 'email')
form_columns = ('username', 'email')
def scaffold_form(self):
form_class = super(UserAdmin, self).scaffold_form()
form_class.password = wtf.TextField('Password')
return form_class
I pushed simple fix which adds support for the SynonymProperty, so it will work even without form customization. Unfortunately, I'm in process of adding MongoDB backend, so I won't be able to release new version any time soon.
Just in case, SynonymProperty was superseded by hybrid properties in SQLAlchemy 0.7 and onward, which should be supported by the Flask-Admin.