title: How can I filter the imagefield by filename in django
body: <p>I add a ImageField in my model like</p>
  
  <pre><code>class UserImage(models.Model):
      photo = models.ImageField(upload_to='target_path')
      ....
  </code></pre>
  
  <p>after I save an image, let's say 'a.jpg', then I want user the filename 'a.jpg' to filter the model, what should I write like:</p>
  
  <pre><code>UserImage.objects.filter(photo.filename='a.jpg')
  ....
  </code></pre>