feat: basic CORE customer/product lookup, add CORE menu entries
This commit is contained in:
commit
ce54ca6bd6
12 changed files with 558 additions and 0 deletions
68
src/sideshow_corepos/web/app.py
Normal file
68
src/sideshow_corepos/web/app.py
Normal file
|
@ -0,0 +1,68 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
################################################################################
|
||||
#
|
||||
# Sideshow-COREPOS -- Case/Special Order Tracker for CORE-POS
|
||||
# Copyright © 2025 Lance Edgar
|
||||
#
|
||||
# This file is part of Sideshow.
|
||||
#
|
||||
# Sideshow is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Sideshow is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Sideshow. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
"""
|
||||
Sideshow-COREPOS web app
|
||||
"""
|
||||
|
||||
from wuttaweb import app as base
|
||||
|
||||
from wutta_corepos.web.db import CoreOpSession
|
||||
|
||||
|
||||
def main(global_config, **settings):
|
||||
"""
|
||||
Make and return the WSGI app (Paste entry point).
|
||||
"""
|
||||
# prefer Sideshow templates over wuttaweb
|
||||
settings.setdefault('mako.directories', [
|
||||
# 'sideshow_corepos.web:templates',
|
||||
'sideshow.web:templates',
|
||||
'wuttaweb:templates',
|
||||
])
|
||||
|
||||
# make config objects
|
||||
wutta_config = base.make_wutta_config(settings)
|
||||
pyramid_config = base.make_pyramid_config(settings)
|
||||
|
||||
# configure DB sessions
|
||||
CoreOpSession.configure(bind=wutta_config.core_office_op_engine)
|
||||
|
||||
# bring in the rest of Sideshow
|
||||
pyramid_config.include('sideshow.web')
|
||||
pyramid_config.include('sideshow_corepos.web')
|
||||
|
||||
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)
|
||||
|
||||
|
||||
def make_asgi_app():
|
||||
"""
|
||||
Make and return the ASGI app.
|
||||
"""
|
||||
return base.make_asgi_app(main)
|
Loading…
Add table
Add a link
Reference in a new issue