code: def logged_delete(self, user):
          
  
          self.delete()
  
          # Log the change
          entry = ChangeLogEntry({
              'type': 'DELETED',
              'documents': [self],
              'user': user
              })
          entry.insert()
  
          return entry
docs: Delete the document and log the event in the change log