Make deletion compatible with django 1.2