@handle_response_format
@treeio_login_required
def document_view(request, document_id, response_format='html'):
 document = get_object_or_404(Document, pk=document_id)
 if (not request.user.profile.has_permission(document)):
  return user_denied(request, message="You don't have access to this Document")
 context = _get_default_context(request)
 context.update({'document': document})
 return render_to_response('documents/document_view', context, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required def document_view ( request , document_id , response_format = 'html' ) : document = get_object_or_404 ( Document , pk = document_id ) if ( not request . user . profile . has_permission ( document ) ) : return user_denied ( request , message = "You don't have access to this Document" ) context = _get_default_context ( request ) context . update ( { 'document' : document } ) return render_to_response ( 'documents/document_view' , context , context_instance = RequestContext ( request ) , response_format = response_format )
single document view page .