Add ASGI app wrapper
This commit is contained in:
parent
2cdd9d3b72
commit
a9a58584bd
|
@ -3,7 +3,7 @@
|
|||
Corporal web app
|
||||
"""
|
||||
|
||||
from tailbone import app
|
||||
from tailbone import app as base
|
||||
|
||||
|
||||
def main(global_config, **settings):
|
||||
|
@ -16,8 +16,8 @@ def main(global_config, **settings):
|
|||
'tailbone:templates'])
|
||||
|
||||
# make config objects
|
||||
rattail_config = app.make_rattail_config(settings)
|
||||
pyramid_config = app.make_pyramid_config(settings)
|
||||
rattail_config = base.make_rattail_config(settings)
|
||||
pyramid_config = base.make_pyramid_config(settings)
|
||||
|
||||
# bring in the rest of Corporal
|
||||
pyramid_config.include('corporal.web.static')
|
||||
|
@ -25,3 +25,12 @@ def main(global_config, **settings):
|
|||
pyramid_config.include('corporal.web.views')
|
||||
|
||||
return pyramid_config.make_wsgi_app()
|
||||
|
||||
|
||||
def asgi_main():
|
||||
"""
|
||||
This function returns an ASGI application.
|
||||
"""
|
||||
from tailbone.asgi import make_asgi_app
|
||||
|
||||
return make_asgi_app(main)
|
||||
|
|
Loading…
Reference in a new issue