MCPcopy
hub / github.com/pallets/werkzeug / make_app

Function make_app

examples/coolmagic/application.py:61–77  ·  view source on GitHub ↗

Factory function that creates a new `CoolmagicApplication` object. Optional WSGI middlewares should be applied here.

(config=None)

Source from the content-addressed store, hash-verified

59
60
61def make_app(config=None):
62 """
63 Factory function that creates a new `CoolmagicApplication`
64 object. Optional WSGI middlewares should be applied here.
65 """
66 config = config or {}
67 app = CoolMagicApplication(config)
68
69 # static stuff
70 app = SharedDataMiddleware(
71 app, {"/public": path.join(path.dirname(__file__), "public")}
72 )
73
74 # clean up locals
75 app = local_manager.make_middleware(app)
76
77 return app

Callers 1

runserverFunction · 0.90

Calls 3

make_middlewareMethod · 0.80

Tested by

no test coverage detected