I've searched the documentation but I haven't found any explanation of the parameters.
The implementation of the DO_NOTHING
does exactly that, so it shouldn't matter what I'm passing in, but for other methods (such as CASCADE) they're actually used.
The closest explanation I've found is a discussion of CASCADE.
What datatypes are collector
, field
, sub_objs
, and using
, and what values do I pass?
EDIT:
I'm using it in my model, like so:
class Office(models.Model):
# Office locations have a name, and a location.
display_name = models.CharField(max_length=255)
location = models.OneToOneField(
GeoLocation,
on_delete=models.DO_NOTHING(None, None, None, None)
)
You shouldn't be calling models.DO_NOTHING
, you should just be passing it as a value:
location = models.OneToOneField(
GeoLocation,
on_delete=models.DO_NOTHING
)
The fact that it's a function is an implementation detail, not part of the API, which is why those parameters are undocumented.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With