#NEWLINE# @ expose ( '/details/' ) #NEWLINE# def details_view( self ) : #NEWLINE# #INDENT# '\n            Details model view\n        ' #NEWLINE# return_url = ( get_redirect_target ( ) or self . get_url ( '.index_view' ) ) #NEWLINE# if ( not self . can_view_details ) : #NEWLINE# #INDENT# return redirect ( return_url ) #NEWLINE# #UNINDENT# id = get_mdict_item_or_list ( request . args , 'id' ) #NEWLINE# if ( id is None ) : #NEWLINE# #INDENT# return redirect ( return_url ) #NEWLINE# #UNINDENT# model = self . get_one ( id ) #NEWLINE# if ( model is None ) : #NEWLINE# #INDENT# flash ( gettext ( 'Record does not exist.' ) ) #NEWLINE# return redirect ( return_url ) #NEWLINE# #UNINDENT# if ( self . details_modal and request . args . get ( 'modal' ) ) : #NEWLINE# #INDENT# template = template . details_modal_template #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# template = self . details_template #NEWLINE# #UNINDENT# return self . render ( template , model = model , details_columns = self . _details_columns , get_value = self . get_list_value , return_url = return_url )