From 640ca783c7c7a7263752095f9d6217737497e858 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 21 Nov 2022 22:08:55 -0600 Subject: [PATCH] Allow running web app via ASGI --- rattail_demo/web/app.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rattail_demo/web/app.py b/rattail_demo/web/app.py index 9e7dd14..1902067 100644 --- a/rattail_demo/web/app.py +++ b/rattail_demo/web/app.py @@ -3,8 +3,6 @@ Pyramid web application """ -from __future__ import unicode_literals, absolute_import - from tailbone import app from tailbone_corepos.db import CoreOfficeSession, CoreTransSession @@ -40,3 +38,12 @@ def main(global_config, **settings): under='pyramid_tm.tm_tween_factory') 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)