Re: change an object from parent to child

2010-05-05 Thread Steve Bywater
Here is a realistic example: I have a model Employee that is a subclass of User, the standard django authentication class, and a model called Supervisor that subclasses Employee. I have Bob, an instance of Employee, that I want to promote to Supervisor. So trying to move the Bob object to the chil

Re: change an object from parent to child

2010-05-04 Thread Shawn Milochik
You can't subclass an instance, just a class/object. Maybe you want a foreign key to place in restaurant. What are you trying to do? Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@goog

change an object from parent to child

2010-05-04 Thread Steve Bywater
Given... class Place(models.Model): name = models.CharField(max_length=50) class Restaurant(Place): serves_hot_dogs = models.BooleanField() ...it is trivial to create either a place or restaurant. But how do you take an instance that is already a place and create a restaurant from it? Is