5 for i, r in enumerate(self):
6 if r.weight > item.weight:
13 HEAD_CONTENT = 'HEAD_CONTENT'
14 HEADER_LINKS = 'HEADER_LINKS'
15 PAGE_TOP_TABS = 'PAGE_TOP_TABS'
16 FOOTER_LINKS = 'FOOTER_LINKS'
17 PROFILE_TABS = 'PROFILE_TABS'
19 USER_MENU = 'USER_MENU'
23 HEAD_CONTENT: Registry(),
24 HEADER_LINKS: Registry(),
25 PAGE_TOP_TABS: Registry(),
26 FOOTER_LINKS: Registry(),
27 PROFILE_TABS: Registry(),
29 USER_MENU: Registry(),
33 def register(registry, *ui_objects):
34 if not registry in __CONTAINER:
35 raise('unknown registry')
37 for ui_object in ui_objects:
38 __CONTAINER[registry].add(ui_object)
40 def get_registry_by_name(name):
43 if not name in __CONTAINER:
44 raise('unknown registry')
46 return __CONTAINER[name]
50 from ui_objects import *