def init_data(): data = {} data['resources'] = resources.init_resources() protoworld = world.World(data) data['world'] = protoworld data['players'] = [] return data
def init_data(): data = {} data['resources'] = resources.init_resources() data['turn'] = 1 protoworld = world.World(data) protoworld = init_cities(protoworld) data['world'] = protoworld data['players'] = [] return data
def create_app() -> Flask: app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.sqlite3' flask_bcrypt.init_app(app) create_db(app) init_resources(app) return app
import os from app import create_app from resources import init_resources #app = create_app(os.getenv('FLASK_CONFIG') or "default") app = create_app("development") app = init_resources(app) # talvez essa funcao nao precise retornar nada if __name__ == "__main__": app.run(host="0.0.0.0", debug=True)
import os from app import create_app from resources import init_resources app = create_app("development") app = init_resources(app) if __name__ == "__main__": app.run(host="0.0.0.0", debug=True)