#NEWLINE# def delete( self ) : #NEWLINE# #INDENT# ' Deletes the object, only if :py:meth:`can_delete` returns ``True``.\n        ' #NEWLINE# if self . can_delete : #NEWLINE# #INDENT# session = self . get_session ( ) #NEWLINE# obj = self . get_object ( ) #NEWLINE# session . delete ( self ) #NEWLINE# session . commit ( ) #NEWLINE# self . success_callback ( )