mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #6445 -- Allow model instances to be used as a default for ForeignKeys
(via a callable). Also updates the documentation of the "default" attribute to indicate a callable can be used. Thanks, Philipe Raoult. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
597f9d6105
commit
b3b8422363
3 changed files with 33 additions and 1 deletions
|
@ -626,7 +626,8 @@ option is ignored.
|
|||
``default``
|
||||
~~~~~~~~~~~
|
||||
|
||||
The default value for the field.
|
||||
The default value for the field. This can be a value or a callable object. If
|
||||
callable it will be called every time a new object is created.
|
||||
|
||||
``editable``
|
||||
~~~~~~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue