@handle_response_format
@treeio_login_required
@_process_mass_lead_form
def lead_index_assigned(request, response_format='html'):
 query = Q(status__hidden=False, assigned=request.user.profile)
 if request.GET:
  if (('status' in request.GET) and request.GET['status']):
   query = _get_filter_query(request.GET)
  else:
   query = (query & _get_filter_query(request.GET))
 statuses = Object.filter_by_request(request, SaleStatus.objects, mode='r')
 leads = Object.filter_by_request(request, Lead.objects.filter(query), mode='r')
 filters = LeadFilterForm(request.user.profile, '', request.GET)
 massform = LeadMassActionForm(request.user.profile)
 return render_to_response('sales/lead_index_assigned', {'leads': leads, 'filters': filters, 'massform': massform, 'statuses': statuses}, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required @ _process_mass_lead_form def lead_index_assigned ( request , response_format = 'html' ) : query = Q ( status__hidden = False , assigned = request . user . profile ) if request . GET : if ( ( 'status' in request . GET ) and request . GET [ 'status' ] ) : query = _get_filter_query ( request . GET ) else : query = ( query & _get_filter_query ( request . GET ) ) statuses = Object . filter_by_request ( request , SaleStatus . objects , mode = 'r' ) leads = Object . filter_by_request ( request , Lead . objects . filter ( query ) , mode = 'r' ) filters = LeadFilterForm ( request . user . profile , '' , request . GET ) massform = LeadMassActionForm ( request . user . profile ) return render_to_response ( 'sales/lead_index_assigned' , { 'leads' : leads , 'filters' : filters , 'massform' : massform , 'statuses' : statuses } , context_instance = RequestContext ( request ) , response_format = response_format )
leads owned by current user .