I have an app based on flask-appbuilder 3.3.3
. I'd like to do insert some records in tableB
after adding a record in tableA
.
I have overridden the post_add()
method :
class UploadFilesModelView(ModelView):
datamodel = SQLAInterface(UploadFile)
def post_add(self, item):
# do something
raise exception("error")
Although an exception was raised, and it is shown in the console, an error message showed on the web page. It shows the "list
" page instead.
How to show an exception message of post_add()
on the page?