title: django query based on dynamic property()
body: <p>I was wondering if there was a way to use Django's filter() on query sets using a dynamically generated python property using <code>property()</code>. I have <code>first_name</code> and <code>last_name</code> of every user, and I want to filter based on their concatenated name <code>first_name last_name</code>. (The reason behind this is that when I do autocomplete I search to see if the query matches first name, last name, or part of the concatenation. I want <code>John S</code> to match <code>John Smith</code>, for example.</p>
  <p>I created a property of <code>name</code>:</p>
  <pre><code>def _get_name(self):
      return self.first_name + &quot; &quot; + self.last_name
  name = property(_get_name)
  </code></pre>
  <p>This way I can call <code>user.name</code> to get the concatenated name.</p>
  <p>However, if I try to do <code>User.objects.filter(name__istartswith=query)</code> I get the error <code>Cannot resolve keyword 'name' into field. </code></p>
  <p>Any ideas on how to do this? Do I have to create another field in the database to store the full name?</p>