I have a model similar to:
class Phone(meta.Model):
number = meta.CharField(maxlength=50, null=True)
class Contact(meta.Model):
phone = meta.ForeignKey(Phone, null=True)
name = meta.CharField (maxlength=200)
After I have data in, I want to be able to delete a contact's phone. As
soon as I remove phone, it will automatically delete my contact object
too.
It sounds like what you want is the django equivalent of ON DELETE SET NULL.
But you haven't given enough detail to really rule out "your schema is horribly screwed up and you should read up on normalization" instead. :)
--
Jonathan Ellis
http://spyced.blogspot.com

