标签:区别 bsp config txt nbsp div 字符串 需求 pre
flask from_object和from_pyfile的区别
from flask import Flask app = Flask(__name__) app.config.from_pyfile(‘config.py‘, silent=True) @app.route(‘/‘) def hello_world(): return ‘Hello World!‘ if __name__ == ‘__main__‘: app.run()
slient = True,当文件的路径不存在时,不会引发异常
flask from_object和from_pyfile的区别
标签:区别 bsp config txt nbsp div 字符串 需求 pre
原文地址:https://www.cnblogs.com/ivy-blogs/p/11470602.html