On 7/4/06, Iain Duncan <[EMAIL PROTECTED]> wrote:
> Can anyone tell me where in the docs to look for how to overide the
> deletion behaviour so that instead of dependecies and dependers getting
> mutually deleted, the foreign key in question can just revert to a null
> value? Concrete example is that if a webpage has a central image, and
> the admin deletes the central image before changing the page, the page
> should have an image of Null instead of vanishing into the ether.

This feels more like a problem to be solved at the database level; the
ideal solution would be to set 'ON DELETE SET NULL' for the
foreign-key column (assuming -- and I don't know if this is the case
-- that Django is doing 'ON DELETE CASCADE'). Just make sure that
column will accept NULL as a value.

-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to