title: Django filter sub-class models
body: <p>I have (essentially) the following models:</p>
  
  <pre><code>class foo(models.model):
      name = models.CharField(max_length=255)
      size = models.PositiveIntegerField()
  
  class bar(foo):
      colour = models.CharField(max_length=25)
  
  class baz(foo):
      material = models.CharField(max_length=25)
  </code></pre>
  
  <p>What I want to do is filter these models based on url parameters. So, if the url is <code>http://www.mysite.com/catalogue/foo?size=3</code> then all <code>foo</code>,<code>bar</code>, and <code>baz</code> objects that are size 3 are displayed.</p>
  
  <p>If the url is <code>http://www.mysite.com/catalogue/foo?size=3&amp;colour=red&amp;colour=green</code> then all <code>foo</code> object with the attributes <code>size</code> and <code>colour</code> (that is <code>bar</code> objects) are displayed if the size is 3 and the colour is either red or green.</p>
  
  <p>Can this work?</p>