##// END OF EJS Templates
navigation: allow passing already found registry
marcink -
r2324:1cd7c646 default
parent child Browse files
Show More
@@ -126,11 +126,11 b' class NavigationRegistry(object):'
126 return navlist
126 return navlist
127
127
128
128
129 def navigation_registry(request):
129 def navigation_registry(request, registry=None):
130 """
130 """
131 Helper that returns the admin navigation registry.
131 Helper that returns the admin navigation registry.
132 """
132 """
133 pyramid_registry = get_registry(request)
133 pyramid_registry = registry or get_registry(request)
134 nav_registry = pyramid_registry.queryUtility(IAdminNavigationRegistry)
134 nav_registry = pyramid_registry.queryUtility(IAdminNavigationRegistry)
135 return nav_registry
135 return nav_registry
136
136
General Comments 0
You need to be logged in to leave comments. Login now