From 26d44390a52a1a2e01c339359385aeeabc2d3abc Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 15 Jul 2024 21:48:18 -0500 Subject: [PATCH] todo: should avoid building menus for non-traditional web apps main use case in mind here is "API" web apps, which obviously do not need menus. do we need two hooks for the same (new request) hook? --- src/wuttaweb/subscribers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wuttaweb/subscribers.py b/src/wuttaweb/subscribers.py index 314922b..eea26d2 100644 --- a/src/wuttaweb/subscribers.py +++ b/src/wuttaweb/subscribers.py @@ -142,6 +142,9 @@ def before_render(event): context['url'] = request.route_url context['json'] = json + # TODO: this should be avoided somehow, for non-traditional web + # apps, esp. "API" web apps. (in the meantime can configure the + # app to use NullMenuHandler which avoids most of the overhead.) menus = web.get_menu_handler() context['menus'] = menus.do_make_menus(request)