title: python - Handle column names in form for update query with Flask-SQLAlchemy
body: <p>I'm using Flask and SQLAlchemy and I would like to write an HTML form to perform a database update. However, I would like the user to build the query for convenience:</p>
  
  <p>from a <code>select</code> the user selects the column to be modified, in an <code>input</code> he inserts the new value, from a second <code>select</code> he selects the column for the <code>where</code> clause and in the last input text he inserts the value of the condition.</p>
  
  <p>From a logical point of view I thought of something like this:</p>
  
  <pre><code>exhb = Exhibition.query.filter_by (request.form.get ('wh') = request.form ['cond']). first ()
  exhb.request.form.get ('columns') = Request.Form ['val']
  db.session.commit ()
  </code></pre>
  
  <p>But it returns:</p>
  
  <pre><code>SyntaxError: keyword can not be an expression
  </code></pre>
  
  <p>I tried to use two variables to assign <code>wh</code> and <code>columns</code> but, although the value are read correctly, it returns me:</p>
  
  <pre><code>Entity '&lt;class' connect.Exhibition '&gt;' has no property 'wh'
  </code></pre>
  
  <p>How can I then simply get the name of the two columns to be used in the query? Are there any built-in methods to do this?</p>