@handle_response_format
@treeio_login_required
def sla_view(request, sla_id, response_format='html'):
 sla = get_object_or_404(ServiceLevelAgreement, pk=sla_id)
 if (not request.user.profile.has_permission(sla)):
  return user_denied(request, message="You don't have access to this Service Level Agreement")
 context = _get_default_context(request)
 context.update({'sla': sla})
 return render_to_response('services/sla_view', context, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required def sla_view ( request , sla_id , response_format = 'html' ) : sla = get_object_or_404 ( ServiceLevelAgreement , pk = sla_id ) if ( not request . user . profile . has_permission ( sla ) ) : return user_denied ( request , message = "You don't have access to this Service Level Agreement" ) context = _get_default_context ( request ) context . update ( { 'sla' : sla } ) return render_to_response ( 'services/sla_view' , context , context_instance = RequestContext ( request ) , response_format = response_format )
servicelevelagreement view .