#NEWLINE# def confirm( self , token ) : #NEWLINE# #INDENT# s = Serializer ( current_app . config [ 'SECRET_KEY' ] ) #NEWLINE# try : #NEWLINE# #INDENT# data = s . loads ( token ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( data . get ( 'confirm' ) != self . id ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# self . confirmed = True #NEWLINE# db . session . add ( self ) #NEWLINE# return True