@handle_response_format
@treeio_login_required
def agent_view(request, agent_id, response_format='html'):
 view_agent = get_object_or_404(ServiceAgent, pk=agent_id)
 if (not request.user.profile.has_permission(view_agent)):
  return user_denied(request, message="You don't have access to this Service Agent")
 context = _get_default_context(request)
 context.update({'view_agent': view_agent})
 return render_to_response('services/agent_view', context, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required def agent_view ( request , agent_id , response_format = 'html' ) : view_agent = get_object_or_404 ( ServiceAgent , pk = agent_id ) if ( not request . user . profile . has_permission ( view_agent ) ) : return user_denied ( request , message = "You don't have access to this Service Agent" ) context = _get_default_context ( request ) context . update ( { 'view_agent' : view_agent } ) return render_to_response ( 'services/agent_view' , context , context_instance = RequestContext ( request ) , response_format = response_format )
agent view .