code: def logged_insert(self, user):
          
  
          # Insert the frame's document
          self.insert()
  
          # Log the insert
          entry = ChangeLogEntry({
              'type': 'ADDED',
              'documents': [self],
              'user': user
              })
          entry.insert()
  
          return entry
docs: Create and insert the document and log the event in the change log