title: Customize (override) Flask-Admin's Submit method from edit view
body: <p><em>Preconditions:</em><br>
  I'm new to Python and to Flask-Admin in particular. I created a simple test service, which has MondoDB, keeping the data with relationship of 'one-to-one' kind. </p>
  
  <blockquote>
    <p>employeeName -> salary</p>
  </blockquote>
  
  <p>The model looks like that:</p>
  
  <pre><code>class Employee(db.Document):
      fullName = db.StringField(max_length=160, unique=True)
      salary = db.IntField()
  </code></pre>
  
  <p>And I use Flask-Admin to observe the table with the data and to edit it. 
  When I want to change the 'salary' field, I just press the 'edit' button and in Flask-Admin's default edit view I change the integer value. I press 'Submit' and a new value in the database is successfully applied.</p>
  
  <p><em>Question:</em><br>
  But I need to override the Submit method in the way, that leaves as it is the functionality and <strong>adds</strong> some custom code. Like let's assume I want to add a comment in the log file after an actual db submit: </p>
  
  <blockquote>
    <p>logging.warning('The salary of %s: was changed to /%s', fullName, salary)</p>
  </blockquote>
  
  <p>Any suggestion on how to achieve that would be much appreciated. Perhaps you could direct me in the way to go, since the Flask-Admin documentation doesn't give me enough help so far.</p>