Some questions about the Writing of Flask Application configuration File

flask configuration files are written in many ways, and the following is one:

class Config:
    SECRET_KEY = "hard to guess string"
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    @staticmethod
    def init_app(app):
        pass

this is the official list, and it is also the one I have seen others use most. I haven"t been able to figure out the purpose of the init_app () method. Can anyone explain it?

Apr.02,2021
Menu