Allow running web app via ASGI
This commit is contained in:
parent
e6d4f7e303
commit
640ca783c7
|
@ -3,8 +3,6 @@
|
||||||
Pyramid web application
|
Pyramid web application
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import unicode_literals, absolute_import
|
|
||||||
|
|
||||||
from tailbone import app
|
from tailbone import app
|
||||||
from tailbone_corepos.db import CoreOfficeSession, CoreTransSession
|
from tailbone_corepos.db import CoreOfficeSession, CoreTransSession
|
||||||
|
|
||||||
|
@ -40,3 +38,12 @@ def main(global_config, **settings):
|
||||||
under='pyramid_tm.tm_tween_factory')
|
under='pyramid_tm.tm_tween_factory')
|
||||||
|
|
||||||
return pyramid_config.make_wsgi_app()
|
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