From 6e2bb344e40dafdf462f6fb660837fa061faf549 Mon Sep 17 00:00:00 2001
From: Tim Graham <timograham@gmail.com>
Date: Sat, 8 Sep 2012 14:52:17 -0400
Subject: [PATCH] Fixed #18478 - Documented how to use a mutable default in a
 model field.

---
 docs/ref/models/fields.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 190c0037ca..8b3c31f029 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -195,6 +195,14 @@ support tablespaces for indexes, this option is ignored.
 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.
 
+The default cannot be a mutable object (model instance, list, set, etc.), as a
+reference to the same instance of that object would be used as the default
+value in all new model instances. Instead, wrap the desired default in a
+callable.  For example, if you had a custom ``JSONField`` and wanted to specify
+a dictionary as the default, use a ``lambda`` as follows::
+
+    contact_info = JSONField("ContactInfo", default=lambda:{"email": "to1@example.com"})
+
 ``editable``
 ------------