Add full set of default menus
plus dynamic set of integration menus, from providers
This commit is contained in:
parent
39d53617bd
commit
9d2bcff96b
3 changed files with 269 additions and 95 deletions
|
@ -26,8 +26,12 @@ Tailbone Handler
|
|||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import six
|
||||
|
||||
from rattail.app import GenericHandler
|
||||
|
||||
from tailbone.providers import get_all_providers
|
||||
|
||||
|
||||
class TailboneHandler(GenericHandler):
|
||||
"""
|
||||
|
@ -46,4 +50,9 @@ class TailboneHandler(GenericHandler):
|
|||
default='tailbone.menus:MenuHandler')
|
||||
Handler = self.app.load_object(spec)
|
||||
self.menu_handler = Handler(self.config)
|
||||
self.menu_handler.tb = self
|
||||
return self.menu_handler
|
||||
|
||||
def iter_providers(self):
|
||||
providers = get_all_providers(self.config)
|
||||
return six.itervalues(providers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue