Coverage for .tox / coverage / lib / python3.11 / site-packages / sideshow / web / app.py: 100%
11 statements
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-15 17:10 -0600
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-15 17:10 -0600
1# -*- coding: utf-8; -*-
2################################################################################
3#
4# Sideshow -- Case/Special Order Tracker
5# Copyright © 2024-2025 Lance Edgar
6#
7# This file is part of Sideshow.
8#
9# Sideshow is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# Sideshow is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with Sideshow. If not, see <http://www.gnu.org/licenses/>.
21#
22################################################################################
23"""
24Sideshow web app
25"""
27from wuttaweb import app as base
30def main(global_config, **settings): # pylint: disable=unused-argument
31 """
32 Make and return the WSGI app (Paste entry point).
33 """
34 # prefer Sideshow templates over wuttaweb
35 settings.setdefault(
36 "mako.directories",
37 [
38 "sideshow.web:templates",
39 "wuttaweb:templates",
40 ],
41 )
43 # make config objects
44 wutta_config = base.make_wutta_config(settings) # pylint: disable=unused-variable
45 pyramid_config = base.make_pyramid_config(settings)
47 # bring in the rest of Sideshow
48 pyramid_config.include("sideshow.web")
50 return pyramid_config.make_wsgi_app()
53def make_wsgi_app(config=None):
54 """
55 Make and return the WSGI app (generic entry point).
56 """
57 return base.make_wsgi_app(main, config=config)
60def make_asgi_app(config=None):
61 """
62 Make and return the ASGI app.
63 """
64 return base.make_asgi_app(main, config=config)