summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCameron Curry <cameroncurry@users.noreply.github.com>2017-12-18 21:19:57 +0100
committerTim Graham <timograham@gmail.com>2017-12-22 16:31:46 -0500
commit622ead6aaf55288cd355f22e8bb9c56d8e12556c (patch)
tree8cf0611e087d7b97b6786a97d9758f4065d8c8fa /docs
parent9f7772e098439f9edea3d25ab127539fc514eeb2 (diff)
Fixed #28937 -- Allowed BinaryField to be editable=True.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt10
-rw-r--r--docs/releases/2.1.txt3
-rw-r--r--docs/topics/forms/modelforms.txt5
3 files changed, 16 insertions, 2 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index bcbda45145..afd0d6ff0c 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -420,8 +420,14 @@ guaranteed to fit numbers from ``-9223372036854775808`` to
A field to store raw binary data. It only supports ``bytes`` assignment. Be
aware that this field has limited functionality. For example, it is not possible
-to filter a queryset on a ``BinaryField`` value. It is also not possible to
-include a ``BinaryField`` in a :class:`~django.forms.ModelForm`.
+to filter a queryset on a ``BinaryField`` value.
+
+By default, ``BinaryField`` sets :attr:`~Field.editable` to ``False``, in which
+case it can't be included in a :class:`~django.forms.ModelForm`.
+
+.. versionchanged:: 2.1
+
+ Older versions don't allow setting ``editable`` to ``True``.
.. admonition:: Abusing ``BinaryField``
diff --git a/docs/releases/2.1.txt b/docs/releases/2.1.txt
index 1183bd3121..b786fdae11 100644
--- a/docs/releases/2.1.txt
+++ b/docs/releases/2.1.txt
@@ -157,6 +157,9 @@ Models
* Models can now use ``__init_subclass__()`` from :pep:`487`.
+* A ``BinaryField`` may now be set to ``editable=True`` if you wish to include
+ it in model forms.
+
Requests and Responses
~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
index 1969474b89..c261fb75d7 100644
--- a/docs/topics/forms/modelforms.txt
+++ b/docs/topics/forms/modelforms.txt
@@ -62,6 +62,11 @@ Model field Form field
``min_value`` set to -9223372036854775808
and ``max_value`` set to 9223372036854775807.
+:class:`BinaryField` :class:`~django.forms.CharField`, if
+ :attr:`~.Field.editable` is set to
+ ``True`` on the model field, otherwise not
+ represented in the form.
+
:class:`BooleanField` :class:`~django.forms.BooleanField`
:class:`CharField` :class:`~django.forms.CharField` with