feat: move core menu logic to wuttaweb
tailbone still defines the default menus, and allows for making dynamic menus from config (which wuttaweb does not). also remove some even older logic for "v1" menu functions
This commit is contained in:
parent
0b4629ea29
commit
fd1ec01128
4 changed files with 54 additions and 212 deletions
|
@ -24,6 +24,8 @@
|
|||
Tailbone Handler
|
||||
"""
|
||||
|
||||
import warnings
|
||||
|
||||
from mako.lookup import TemplateLookup
|
||||
|
||||
from rattail.app import GenericHandler
|
||||
|
@ -46,11 +48,14 @@ class TailboneHandler(GenericHandler):
|
|||
|
||||
def get_menu_handler(self, **kwargs):
|
||||
"""
|
||||
Get the configured "menu" handler.
|
||||
|
||||
:returns: The :class:`~tailbone.menus.MenuHandler` instance
|
||||
for the app.
|
||||
DEPRECATED; use
|
||||
:meth:`wuttaweb.handler.WebHandler.get_menu_handler()`
|
||||
instead.
|
||||
"""
|
||||
warnings.warn("TailboneHandler.get_menu_handler() is deprecated; "
|
||||
"please use WebHandler.get_menu_handler() instead",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
|
||||
if not hasattr(self, 'menu_handler'):
|
||||
spec = self.config.get('tailbone.menus', 'handler',
|
||||
default='tailbone.menus:MenuHandler')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue