1
0
Fork 0

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?
This commit is contained in:
Lance Edgar 2024-07-15 21:48:18 -05:00
parent 8ae140555a
commit 26d44390a5

View file

@ -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)