I have some code that follows the example for multi-table inheritance as given on the documentation page: http://docs.djangoproject.com/en/dev/topics/db/models/#multi-table-inheritance. What I am trying to do is create a restaurant around a place.
I've already created a place, and I want to make a restaurant at it like so:
>>> p = Place.objects.get(id=12)
# If p is a Restaurant object, this will give the child class:
>>> p.restaurant
<Restaurant: ...>
>>> r = Restaurant(p)
but I just get this error:
TypeError: int() argument must be a string or a number, not 'Place'
I want to add more information to my models, so I don't want to go in and manually set all the fields to be equal. is there anyway to do this?