@register.inclusion_tag('horizon/_nav_list.html', takes_context=True)
def horizon_main_nav(context):
 if ('request' not in context):
  return {}
 current_dashboard = context['request'].horizon.get('dashboard', None)
 dashboards = []
 for dash in Horizon.get_dashboards():
  if dash.can_access(context):
   if (callable(dash.nav) and dash.nav(context)):
    dashboards.append(dash)
   elif dash.nav:
    dashboards.append(dash)
 return {'components': dashboards, 'user': context['request'].user, 'current': current_dashboard, 'request': context['request']}

@ register . inclusion_tag ( 'horizon/_nav_list.html' , takes_context = True ) def horizon_main_nav ( context ) : if ( 'request' not in context ) : return { } current_dashboard = context [ 'request' ] . horizon . get ( 'dashboard' , None ) dashboards = [ ] for dash in Horizon . get_dashboards ( ) : if dash . can_access ( context ) : if ( callable ( dash . nav ) and dash . nav ( context ) ) : dashboards . append ( dash ) elif dash . nav : dashboards . append ( dash ) return { 'components' : dashboards , 'user' : context [ 'request' ] . user , 'current' : current_dashboard , 'request' : context [ 'request' ] }
generates top-level dashboard navigation entries .