Here is the troublesome code:
class Restaurant(models.Model):
name = models.CharField(max_length=32)
address = models.CharField(max_length=200, null=True, blank=True)
def __unicode__(self):
return unicode(self.name)
class Admin:
pass
class Italian(Restaurant):
traditional = models.BooleanField(null=True, blank=True)
class Admin:
pass
class Chinese(Restaurant):
only_chopsticks = models.BooleanField(null=True, blank=True)
class Admin:
pass
class Mobster(models.Model):
name = models.CharField(max_length=48)
fav_italian = models.ForeignKey(Italian, related_name="mobster_italian", null=True, blank=True)
fav_restaurant = models.ForeignKey(Restaurant, related_name="mobster_restaurant", null=True, blank=True)
class Admin:
list_display = ('name', 'fav_italian', 'fav_restaurant')
list_filter = ('name', 'fav_italian', 'fav_restaurant')
On the filters, only 'name' and 'fav_restaurant' are available. To actually filter with respect to fav_italian, I have to alter the URL.