@treeio_login_required
@handle_response_format
@_process_mass_form
def type_view(request, type_id, response_format='html'):
 item_type = get_object_or_404(ItemType, pk=type_id)
 if (not request.user.profile.has_permission(item_type)):
  return user_denied(request, message="You don't have access to this Item Type", response_format=response_format)
 query = Q(item_type=item_type)
 if request.GET:
  query = (query & _get_filter_query(request.GET))
 items = Object.filter_by_request(request, Item.objects.filter(query).order_by('name'))
 filters = FilterForm(request.user.profile, ['item_type'], request.GET)
 context = _get_default_context(request)
 context.update({'items': items, 'filters': filters, 'item_type': item_type})
 return render_to_response('infrastructure/item_type_view', context, context_instance=RequestContext(request), response_format=response_format)

@ treeio_login_required @ handle_response_format @ _process_mass_form def type_view ( request , type_id , response_format = 'html' ) : item_type = get_object_or_404 ( ItemType , pk = type_id ) if ( not request . user . profile . has_permission ( item_type ) ) : return user_denied ( request , message = "You don't have access to this Item Type" , response_format = response_format ) query = Q ( item_type = item_type ) if request . GET : query = ( query & _get_filter_query ( request . GET ) ) items = Object . filter_by_request ( request , Item . objects . filter ( query ) . order_by ( 'name' ) ) filters = FilterForm ( request . user . profile , [ 'item_type' ] , request . GET ) context = _get_default_context ( request ) context . update ( { 'items' : items , 'filters' : filters , 'item_type' : item_type } ) return render_to_response ( 'infrastructure/item_type_view' , context , context_instance = RequestContext ( request ) , response_format = response_format )
contacts by type .