title: Dynamic object filter
body: <p>I have a filter query which varies depending on the search criteria, </p>
  
  <p>Sometimes it is:</p>
  
  <pre><code>Thing.object.filter(name__startswith=word).distinct('id')
  </code></pre>
  
  <p>and sometimes:</p>
  
  <pre><code>Thing.object.filter(city__startswith=word)
  </code></pre>
  
  <p>So everything after <code>.filter(</code> can change. Is there a way to set this dynamically? </p>