@require_authorized_admin
@facility_from_request
@render_to('coachreports/coach.html')
def coach_reports(request, facility=None, zone_id=None):
 zone = get_object_or_None(Zone, pk=zone_id)
 if ((not zone) and settings.CENTRAL_SERVER):
  raise Http404('Zone not found.')
 if facility:
  facility_id = facility.id
 else:
  facility_id = None
 return {'facility_id': facility_id, 'zone_id': (zone.id if zone else None)}

@ require_authorized_admin @ facility_from_request @ render_to ( 'coachreports/coach.html' ) def coach_reports ( request , facility = None , zone_id = None ) : zone = get_object_or_None ( Zone , pk = zone_id ) if ( ( not zone ) and settings . CENTRAL_SERVER ) : raise Http404 ( 'Zone not found.' ) if facility : facility_id = facility . id else : facility_id = None return { 'facility_id' : facility_id , 'zone_id' : ( zone . id if zone else None ) }
landing page needs plotting context in order to generate the navbar .