fix: register entry points for sideshow customization
This commit is contained in:
parent
c2f76f6c97
commit
4dc9cb36b7
6
docs/api/sideshow_corepos.config.rst
Normal file
6
docs/api/sideshow_corepos.config.rst
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
``sideshow_corepos.config``
|
||||||
|
===========================
|
||||||
|
|
||||||
|
.. automodule:: sideshow_corepos.config
|
||||||
|
:members:
|
|
@ -16,6 +16,7 @@ This is `Sideshow`_ with integration for `CORE-POS`_.
|
||||||
api/sideshow_corepos
|
api/sideshow_corepos
|
||||||
api/sideshow_corepos.batch
|
api/sideshow_corepos.batch
|
||||||
api/sideshow_corepos.batch.neworder
|
api/sideshow_corepos.batch.neworder
|
||||||
|
api/sideshow_corepos.config
|
||||||
api/sideshow_corepos.web
|
api/sideshow_corepos.web
|
||||||
api/sideshow_corepos.web.app
|
api/sideshow_corepos.web.app
|
||||||
api/sideshow_corepos.web.menus
|
api/sideshow_corepos.web.menus
|
||||||
|
|
|
@ -43,6 +43,15 @@ tests = ["pytest-cov", "tox"]
|
||||||
[project.entry-points."paste.app_factory"]
|
[project.entry-points."paste.app_factory"]
|
||||||
"main" = "sideshow_corepos.web.app:main"
|
"main" = "sideshow_corepos.web.app:main"
|
||||||
|
|
||||||
|
[project.entry-points."wutta.batch.neworder"]
|
||||||
|
"sideshow_corepos" = "sideshow_corepos.batch.neworder:NewOrderBatchHandler"
|
||||||
|
|
||||||
|
[project.entry-points."wutta.config.extensions"]
|
||||||
|
"sideshow_corepos" = "sideshow_corepos.config:SideshowCoreposConfig"
|
||||||
|
|
||||||
|
[project.entry-points."wutta.web.menus"]
|
||||||
|
"sideshow_corepos" = "sideshow_corepos.web.menus:SideshowMenuHandler"
|
||||||
|
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://wuttaproject.org/"
|
Homepage = "https://wuttaproject.org/"
|
||||||
|
|
47
src/sideshow_corepos/config.py
Normal file
47
src/sideshow_corepos/config.py
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# -*- 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 config extension
|
||||||
|
"""
|
||||||
|
|
||||||
|
from wuttjamaican.conf import WuttaConfigExtension
|
||||||
|
|
||||||
|
|
||||||
|
class SideshowCoreposConfig(WuttaConfigExtension):
|
||||||
|
"""
|
||||||
|
Config extension for Sideshow-COREPOS.
|
||||||
|
|
||||||
|
This establishes some config defaults specific to Sideshow-COREPOS.
|
||||||
|
"""
|
||||||
|
key = 'sideshow_corepos'
|
||||||
|
|
||||||
|
def configure(self, config):
|
||||||
|
""" """
|
||||||
|
|
||||||
|
# batch handlers
|
||||||
|
config.setdefault(f'{config.appname}.batch.neworder.handler.spec',
|
||||||
|
'sideshow_corepos.batch.neworder:NewOrderBatchHandler')
|
||||||
|
|
||||||
|
# web app menu
|
||||||
|
config.setdefault(f'{config.appname}.web.menus.handler.spec',
|
||||||
|
'sideshow_corepos.web.menus:SideshowMenuHandler')
|
Loading…
Reference in a new issue