#NEWLINE# def get_redirect_url( self , pk , commit_pk ) : #NEWLINE# #INDENT# vt = get_object_or_404 ( self . get_queryset ( ) , pk = pk ) #NEWLINE# commit = get_object_or_404 ( vt . commits . select_related ( 'root_node' ) , pk = history_url ) #NEWLINE# commit . tracker = vt #NEWLINE# if ( not self . site . has_change_permission ( self . request , commit . reviewedversioncommit ) ) : #NEWLINE# #INDENT# raise PermissionDenied ( _ ( "You don't have permission to approve commits." ) ) #NEWLINE# #UNINDENT# self . action ( commit ) #NEWLINE# history_url = self . site . reverse ( self . site . history_view , kwargs = { #NEWLINE# #INDENT# 'pk' : vt . pk , #NEWLINE# #UNINDENT# } ) #NEWLINE# messages . success ( self . request , self . get_message ( commit , history_url ) ) #NEWLINE# return history_url