From f1dcec111ccd716ef5ed66a2f3b1800924a8c5cd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 18 Dec 2024 12:36:14 -0600 Subject: [PATCH] add generic WSGI entry point, for uvicorn etc. --- .../{{ cookiecutter.package_name }}/web/app.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/{{ cookiecutter.repo_name }}/{{ cookiecutter.package_name }}/web/app.py b/{{ cookiecutter.repo_name }}/{{ cookiecutter.package_name }}/web/app.py index 06c32d9..28e98d7 100644 --- a/{{ cookiecutter.repo_name }}/{{ cookiecutter.package_name }}/web/app.py +++ b/{{ cookiecutter.repo_name }}/{{ cookiecutter.package_name }}/web/app.py @@ -8,7 +8,7 @@ from wuttaweb import app as base def main(global_config, **settings): """ - This function returns a Pyramid WSGI application. + Make and return the WSGI app (Paste entry point). """ # prefer {{cookiecutter.project_name}} templates over wuttaweb settings.setdefault('mako.directories', [ @@ -26,3 +26,10 @@ def main(global_config, **settings): pyramid_config.include('{{cookiecutter.package_name}}.web.views') return pyramid_config.make_wsgi_app() + + +def make_wsgi_app(): + """ + Make and return the WSGI app (generic entry point). + """ + return base.make_wsgi_app(main)