I.e. we have
class Place(models.Model):...
class Restaurant(Place):...
class Cafe(Place):...
I'd like to query Place somehow:
q = Place.objects.all() # how?
but for q[x] i'd like to have not Place class instance, but Restaurant or Cafe instead (what are really stored), so I'll be able to call some polymorphic methods of the models classes. Possible?
You can only get instances of the parent class if you place your query on the parent class, but according to Django's documentation on Multi-table inheritance:
You can therefore access
RestaurantandCafeinstances through therestaurantandcaferelated names: