#NEWLINE# @ staff_member_required #NEWLINE# def view_detail( request , view ) : #NEWLINE# #INDENT# if ( not utils . docutils_is_available ) : #NEWLINE# #INDENT# return missing_docutils_page ( request ) #NEWLINE# #UNINDENT# ( mod , func ) = urlresolvers . get_mod_func ( view ) #NEWLINE# try : #NEWLINE# #INDENT# view_func = getattr ( import_module ( mod ) , func ) #NEWLINE# #UNINDENT# except ( ImportError , AttributeError ) : #NEWLINE# #INDENT# raise Http404 #NEWLINE# #UNINDENT# ( title , body , metadata ) = utils . parse_docstring ( view_func . __doc__ ) #NEWLINE# if title : #NEWLINE# #INDENT# title = utils . parse_rst ( title , 'view' , ( _ ( 'view:' ) + view ) ) #NEWLINE# #UNINDENT# if body : #NEWLINE# #INDENT# body = utils . parse_rst ( body , 'view' , ( _ ( 'view:' ) + view ) ) #NEWLINE# #UNINDENT# for key in metadata : #NEWLINE# #INDENT# metadata [ key ] = utils . parse_rst ( metadata [ key ] , 'model' , ( _ ( 'view:' ) + view ) ) #NEWLINE# #UNINDENT# return render_to_response ( 'admin_doc/view_detail.html' , { #NEWLINE# #INDENT# 'root_path' : urlresolvers . reverse ( 'admin:index' ) , #NEWLINE# 'name' : view , #NEWLINE# 'summary' : key , #NEWLINE# 'body' : body , #NEWLINE# 'meta' : metadata , #NEWLINE# #UNINDENT# } , context_instance = RequestContext ( request ) )