diff --git a/tailbone/menus.py b/tailbone/menus.py index 84c12343..abd0b58b 100644 --- a/tailbone/menus.py +++ b/tailbone/menus.py @@ -745,3 +745,18 @@ class MenuHandler(TailboneMenuHandler): "please use tailbone.menus.TailboneMenuHandler instead", DeprecationWarning, stacklevel=2) super().__init__(*args, **kwargs) + + +class NullMenuHandler(WuttaMenuHandler): + """ + Null menu handler which uses an empty menu set. + + .. note: + + This class shouldn't even exist, but for the moment, it is + useful to configure non-traditional (e.g. API) web apps to use + this, in order to avoid most of the overhead. + """ + + def make_menus(self, request, **kwargs): + return []