2024-11-26 11:16:09 -06:00
|
|
|
# -*- coding: utf-8; -*-
|
|
|
|
"""
|
|
|
|
{{cookiecutter.project_name}} web app
|
|
|
|
"""
|
|
|
|
|
|
|
|
from wuttaweb import app as base
|
|
|
|
|
|
|
|
|
|
|
|
def main(global_config, **settings):
|
|
|
|
"""
|
2024-12-18 12:36:14 -06:00
|
|
|
Make and return the WSGI app (Paste entry point).
|
2024-11-26 11:16:09 -06:00
|
|
|
"""
|
|
|
|
# prefer {{cookiecutter.project_name}} templates over wuttaweb
|
|
|
|
settings.setdefault('mako.directories', [
|
|
|
|
'{{cookiecutter.package_name}}.web:templates',
|
|
|
|
'wuttaweb:templates',
|
|
|
|
])
|
|
|
|
|
|
|
|
# make config objects
|
|
|
|
wutta_config = base.make_wutta_config(settings)
|
|
|
|
pyramid_config = base.make_pyramid_config(settings)
|
|
|
|
|
|
|
|
# bring in the rest of {{cookiecutter.project_name}}
|
|
|
|
pyramid_config.include('{{cookiecutter.package_name}}.web.static')
|
|
|
|
pyramid_config.include('{{cookiecutter.package_name}}.web.subscribers')
|
|
|
|
pyramid_config.include('{{cookiecutter.package_name}}.web.views')
|
|
|
|
|
|
|
|
return pyramid_config.make_wsgi_app()
|
2024-12-18 12:36:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
def make_wsgi_app():
|
|
|
|
"""
|
|
|
|
Make and return the WSGI app (generic entry point).
|
|
|
|
"""
|
|
|
|
return base.make_wsgi_app(main)
|
2024-12-18 15:10:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
def make_asgi_app():
|
|
|
|
"""
|
|
|
|
Make and return the ASGI app.
|
|
|
|
"""
|
|
|
|
return base.make_asgi_app(main)
|