#NEWLINE# @ classmethod #NEWLINE# def expunge( cls , hours_ago = None ) : #NEWLINE# #INDENT# if ( before is None ) : #NEWLINE# #INDENT# hours_ago = settings . ACCOUNT_DELETION_EXPUNGE_HOURS #NEWLINE# #UNINDENT# before = ( timezone . now ( ) - datetime . timedelta ( hours = hours_ago ) ) #NEWLINE# count = 0 #NEWLINE# for account_deletion in cls . objects . filter ( date_requested__lt = before , user__isnull = False ) : #NEWLINE# #INDENT# settings . ACCOUNT_DELETION_EXPUNGE_CALLBACK ( account_deletion ) #NEWLINE# account_deletion . date_expunged = timezone . now ( ) #NEWLINE# account_deletion . save ( ) #NEWLINE# count += 1 #NEWLINE# #UNINDENT# return count