I saw this in the docs:
"When Django deletes an object, it emulates the behavior of the SQL
constraint ON DELETE CASCADE -- in other words, any objects which had
foreign keys pointing at the object to be deleted will be deleted
along with it."
So it sounds like you don't need to do anything.
ok so I have a list of servers that have a one to one relationship with a
table called cpu. When I delete a server from the server table it should
also delete it one to one relationship with the cpu entry. right? do I
need to pass something extra in the models.py to have this happen?
2 matches
Mail list logo