@register.simple_tag(takes_context=True)
def navigation_bar_hooks(context):
 s = u''
 for hook in NavigationBarHook.hooks:
  try:
   for nav_info in hook.get_entries(context):
    if nav_info:
     url_name = nav_info.get(u'url_name', None)
     if url_name:
      nav_info[u'url'] = local_site_reverse(url_name, request=context.get(u'request'))
     context.push()
     context[u'entry'] = nav_info
     s += render_to_string(u'extensions/navbar_entry.html', context)
     context.pop()
  except Exception as e:
   extension = hook.extension
   logging.error(u'Error when running NavigationBarHook.get_entries function in extension: "%s": %s', extension.id, e, exc_info=1)
 return s

@ register . simple_tag ( takes_context = True ) def navigation_bar_hooks ( context ) : s = u'' for hook in NavigationBarHook . hooks : try : for nav_info in hook . get_entries ( context ) : if nav_info : url_name = nav_info . get ( u'url_name' , None ) if url_name : nav_info [ u'url' ] = local_site_reverse ( url_name , request = context . get ( u'request' ) ) context . push ( ) context [ u'entry' ] = nav_info s += render_to_string ( u'extensions/navbar_entry.html' , context ) context . pop ( ) except Exception as e : extension = hook . extension logging . error ( u'Error when running NavigationBarHook.get_entries function in extension: "%s": %s' , extension . id , e , exc_info = 1 ) return s
displays all registered navigation bar entries .