Hi,
I have a foreign key from MyModel to contrib.auth.models.User which can
be null.
Unfortunately if you delete the user, the MyModel instance gets deleted, too.
I found an open ticket[1], but nevertheless don't know how to get the "on
delete set null"
done.
One solutio
elete()
the Event e is now deleted from the db
any model with a ForeignKey will be deleted with the model it points to is
deleted.
which is exactly what ForeignKeys are supposed to do
but my desired behavior here is to set: e.venue = None
aka ON DELETE SET NULL
its a weak relationship
btw. this
2 matches
Mail list logo