title: How to remove duplicatates from wtforms QuerySelectField
body: <p>In my Flask form I want to have a drop down list of unique items.Depending on what is selected will filter which items will appear in a second drop down (using javascript for this).</p>
  <p>I have a database table something like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">Category</th>
  <th style="text-align: center;">Sub-category</th>
  <th style="text-align: center;">Type</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">Application</td>
  <td style="text-align: center;">Can't log in</td>
  <td style="text-align: center;">Incident</td>
  </tr>
  <tr>
  <td style="text-align: center;">Application</td>
  <td style="text-align: center;">Error</td>
  <td style="text-align: center;">Incident</td>
  </tr>
  <tr>
  <td style="text-align: center;">Application</td>
  <td style="text-align: center;">Install</td>
  <td style="text-align: center;">Request</td>
  </tr>
  <tr>
  <td style="text-align: center;">Application</td>
  <td style="text-align: center;">Remove</td>
  <td style="text-align: center;">Incident</td>
  </tr>
  <tr>
  <td style="text-align: center;">Database</td>
  <td style="text-align: center;">Optimise</td>
  <td style="text-align: center;">Request</td>
  </tr>
  <tr>
  <td style="text-align: center;">Database</td>
  <td style="text-align: center;">Corrupt</td>
  <td style="text-align: center;">Incident</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>and so on. So in the Category column there are multiple entries of the same name.
  Currently when I populate the QuerySelectField using this:</p>
  <pre><code>category = QuerySelectField(label='Category',
                                 query_factory=lambda: Classification.query.filter_by(selectable=True),
                                 allow_blank=True,
                                 get_label='category', id='category', blank_text=u'Select a category...'
                                  )
  </code></pre>
  <p>I get a list of everything in the Category column. But I only want to list one of each item. How can I do this?</p>
  <p>I thought to use SelectField instead of QuerySelectField but could not figure out how to dynamically create the choices[].</p>