@handle_response_format
@treeio_login_required
def item_view(request, folderPath, itemPath, response_format='html'):
 try:
  item = KnowledgeItem.by_path(folderPath, itemPath)
 except KnowledgeItem.DoesNotExist:
  raise Http404
 if (not item):
  raise Http404
 items = Object.filter_permitted(manager=KnowledgeItem.objects, user=request.user.profile, mode='r')
 if (not request.user.profile.has_permission(item)):
  return user_denied(request, message="You don't have access to this Knowledge Item")
 context = _get_default_context(request)
 context.update({'items': items, 'item': item})
 return render_to_response('knowledge/item_view', context, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required def item_view ( request , folderPath , itemPath , response_format = 'html' ) : try : item = KnowledgeItem . by_path ( folderPath , itemPath ) except KnowledgeItem . DoesNotExist : raise Http404 if ( not item ) : raise Http404 items = Object . filter_permitted ( manager = KnowledgeItem . objects , user = request . user . profile , mode = 'r' ) if ( not request . user . profile . has_permission ( item ) ) : return user_denied ( request , message = "You don't have access to this Knowledge Item" ) context = _get_default_context ( request ) context . update ( { 'items' : items , 'item' : item } ) return render_to_response ( 'knowledge/item_view' , context , context_instance = RequestContext ( request ) , response_format = response_format )
item view .