mirror of
https://github.com/django/django.git
synced 2024-11-21 19:09:18 +01:00
Update fields.txt documentation according to Trac ticket 2750, comment 23
See: https://code.djangoproject.com/ticket/2750#comment:23
This commit is contained in:
parent
16af0c60ed
commit
3a7a2d90cf
@ -479,6 +479,8 @@ For fields like :class:`ForeignKey` that map to model instances, defaults
|
||||
should be the value of the field they reference (``pk`` unless
|
||||
:attr:`~ForeignKey.to_field` is set) instead of model instances.
|
||||
|
||||
For a :class:`ManyToManyField`, the default is not used when saving the object.
|
||||
|
||||
The default value is used when new model instances are created and a value
|
||||
isn't provided for the field. When the field is a primary key, the default is
|
||||
also used when the field is set to ``None``.
|
||||
|
Loading…
Reference in New Issue
Block a user