From 2fda18c6cc9ff830f1dc9740b524a15a733c537d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 14 Jul 2024 11:48:13 -0500 Subject: [PATCH] fix: update menu config per wuttaweb --- theo/config.py | 4 +++- theo/web/menus.py | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/theo/config.py b/theo/config.py index 1aa62d6..fa6b006 100644 --- a/theo/config.py +++ b/theo/config.py @@ -38,9 +38,11 @@ class TheoConfig(ConfigExtension): # this is the "Theo" app config.setdefault('rattail', 'app_title', "Theo") config.setdefault('rattail', 'app_package', 'theo') - config.setdefault('tailbone.menus', 'handler', 'theo.web.menus:TheoMenuHandler') config.setdefault('tailbone.static_libcache.module', 'theo.web.static') + # menus + config.setdefault('rattail.web.menus.handler_spec', 'theo.web.menus:TheoMenuHandler') + # Trainwreck model is same regardless of POS config.setdefault('rattail.trainwreck', 'model', 'rattail.trainwreck.db.model.defaults') diff --git a/theo/web/menus.py b/theo/web/menus.py index cf855d4..bf8aa1c 100644 --- a/theo/web/menus.py +++ b/theo/web/menus.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2023 Lance Edgar +# Copyright © 2010-2024 Lance Edgar # # This file is part of Rattail. # @@ -27,7 +27,7 @@ Web Menus from tailbone import menus as base -class TheoMenuHandler(base.MenuHandler): +class TheoMenuHandler(base.TailboneMenuHandler): """ Theo menu handler """ @@ -36,4 +36,4 @@ class TheoMenuHandler(base.MenuHandler): kwargs['include_worksheets'] = True - return super(TheoMenuHandler, self).make_reports_menu(request, **kwargs) + return super().make_reports_menu(request, **kwargs)