diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-20 06:56:23 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-20 06:56:23 +0000 |
| commit | b3b8422363dd450d1ff1a376ab1f74cf2e22ce1b (patch) | |
| tree | d0501cba06757600eaab4afa55af86ef8e72414d /docs | |
| parent | 597f9d61050ee15df807bda6a7d9a0ff5def9774 (diff) | |
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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/model-api.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt index 16a45f629e..f73c5aadf7 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -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`` ~~~~~~~~~~~~ |
