#NEWLINE# def transition( self , via , user , silent = False ) : #NEWLINE# #INDENT# '\n        Make a state transition for this object\n        ' #NEWLINE# transitions = dict ( self . transitions ( user ) ) #NEWLINE# if ( via not in transitions ) : #NEWLINE# #INDENT# raise ValidationError ( _ ( 'This transition is not valid' ) ) #NEWLINE# #UNINDENT# success_url = self . obj . _call ( self , self . django_object , user ) #NEWLINE# self . django_object . modified_by = user #NEWLINE# self . django_object . save ( ) #NEWLINE# if ( not silent ) : #NEWLINE# #INDENT# activity_workflow . send ( sender = self . django_object . __class__ , instance = self . django_object , initial = self . initial , final = self . key ) #NEWLINE# #UNINDENT# return success_url