def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) #register_extensions(app) register_blueprints(app) return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) db.init_app(app) register_blueprints(app) return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = 0 return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) register_extensions(app) register_blueprints(app) return app
def create_app(config): '''app 工厂''' app = Flask(__name__) app.config.from_object(configs.get(config)) register_extensions(app) Migrate(app, db) register_blueprints(app) return app
def create_app(config): """ tong guo config jia zai butong pei zhi """ app = Flask(__name__) app.config.from_object(configs.get(config)) db.init_app(app) Migrate(app, db) register_blueprints(app) return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) # app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = 0 register_extensions(app) register_blueprints(app) return app
def create_app(config): """ App 工厂""" app = Flask(__name__) app.config.from_object(configs.get(config)) db.init_app(app) Migrate(app, db) register_blueprints(app) return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) register_extentions(app) register_blueprints(app) @app.errorhandler(404) def not_found(error): return render_template('404.html'), 404 return app
def create_app(config): """ App 工厂""" app = Flask(__name__) app.config.from_object(configs.get(config)) register_blueprints(app) register_extension(app) # print(app.url_map) return app
def create_app(config): """ App 工厂 """ """ 可以根据传入的 config 名称,加载不同的配置 """ app = Flask(__name__) app.config.from_object(configs.get(config)) register_blueprints(app) register_extensions(app) return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) register_blueprints(app) register_extensions(app) app.config['UPLOADED_DOC_DEST'] = './jobplus/static/resumes' # upload DOC directory configure_uploads(app, set_resume) patch_request_class(app) # set maximum file size, default 16MB return app
def create_app(config): app = Flask(__name__) if isinstance(config, dict): app.config.update(config) else: app.config.from_object(configs.get(config, None)) register_extensions(app) register_blueprints(app) register_error_handlers(app) return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) #db.init_app(app) @app.route('/') def index(): return 'index' return app
def create_app(): """可以根据传入的 config 名称,加载不同的配置 """ app = Flask(__name__) app.config.from_object(configs.get(CURRENT_ENV)) db.init_app(app) Migrate(app, db) register_extensions(app) register_blueprints(app) return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) # db.init_app(app) @app.route('/') def index(): return render_template('index.html') return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) register_extensions(app) # 用于创建测试数据 Migrate(app, db) register_blueprints(app) # 注册自定义过滤器 app.add_template_filter(get_jobdelta) return app
def create_app(config): """可以根据传入的config名称,加载不同的配置 App工厂 """ app = Flask(__name__) app.config.from_object(configs.get(config)) #SQLAlchemy的初始化方式改为使用init_app register_extensions(app) #注册蓝图 register_blueprints(app) return app
def create_app(config): """ App 工厂""" app = Flask(__name__) if isinstance(config, dict): app.config.update(config) else: app.config.from_object(configs.get(config, None)) register_extensions(app) register_bluprints(app) register_error_hanlers(app) return app
def create_app(config): """ Args: config (str): 应用运行配置 """ app = Flask(__name__) app.config.from_object(configs.get(config)) register_blueprints(app) register_extensions(app) register_filters(app) db.init_app(app) Migrate(app, db) configure_uploads(app, photos) return app
def create_app(config): app=Flask(__name__) app.config.from_object(configs.get(config)) db.init_app(app) @app.route('/') def index(): companys=Company.query.all() return render_template('index.html',companys=companys) @app.route('/admin') def admin_index(): return 'admin' return app
def create_app(config): """ 根据不同的config名称,加载不同的配置 """ app = Flask(__name__) app.config.from_object(configs.get(config)) # SQLAlchemy 初始化方式 init_app #db.init_app(app) # flask_migrate 注册app #Migrate(app, db) # 扩展app注册 register_extensions(app) # 工厂函数调用蓝图注册函数 register_blueprints(app) return app
def create_app(config): app = Flask(__name__) app.config.from_object(configs.get(config)) return app