fix: add generic entry points for WSGI and ASGI, e.g. for uvicorn
This commit is contained in:
parent
fbb3d0b6c8
commit
0c4fa7ad06
|
@ -8,7 +8,7 @@ from wuttaweb import app as base
|
||||||
|
|
||||||
def main(global_config, **settings):
|
def main(global_config, **settings):
|
||||||
"""
|
"""
|
||||||
This function returns a Pyramid WSGI application.
|
Make and return the WSGI application, per given settings.
|
||||||
"""
|
"""
|
||||||
# prefer Wutta Demo templates over wuttaweb
|
# prefer Wutta Demo templates over wuttaweb
|
||||||
settings.setdefault('mako.directories', [
|
settings.setdefault('mako.directories', [
|
||||||
|
@ -26,3 +26,17 @@ def main(global_config, **settings):
|
||||||
pyramid_config.include('wuttademo.web.views')
|
pyramid_config.include('wuttademo.web.views')
|
||||||
|
|
||||||
return pyramid_config.make_wsgi_app()
|
return pyramid_config.make_wsgi_app()
|
||||||
|
|
||||||
|
|
||||||
|
def make_wsgi_app():
|
||||||
|
"""
|
||||||
|
Make and return the WSGI app.
|
||||||
|
"""
|
||||||
|
return base.make_wsgi_app(main)
|
||||||
|
|
||||||
|
|
||||||
|
def make_asgi_app():
|
||||||
|
"""
|
||||||
|
Make and return the ASGI app.
|
||||||
|
"""
|
||||||
|
return base.make_asgi_app(main)
|
||||||
|
|
Loading…
Reference in a new issue