Python flask_admin web page data is not updated?

after the database updates the data, there is no change after flask_admin refresh, and the database sqlserver2000

admin, refresh and no re-update

clipboard.png

clipboard.png

I wonder where the cached data is, and I don"t know what to do with it. I found it on the Internet to set the cache. After the following update, it is invalid

.
app.config["SEND_FILE_MAX_AGE_DEFAULT"] = 3

is flask data caching done by flask_sqlalchemy or flask_admin? If you have any knowledge, please do not hesitate to give us your advice. Thank you

Mar.28,2022

has been solved. The processing method is as follows. Flush and commit can be used before obtaining data

class MyV1(ModelView):
    def get_query(self):
        self.session.flush()
        self.session.commit()
        return super(MyV1, self).get_query()
Menu