From 7da55b09845685fc287e3b1fdeb29ae31f3f26c1 Mon Sep 17 00:00:00 2001 From: jcagado Date: Tue, 6 Aug 2024 20:30:59 -0700 Subject: [PATCH] Fixed formatting issues and spelling in fields.txt --- docs/ref/models/fields.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index c80a7a43d4..d0bb594437 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -702,7 +702,7 @@ isn't defined. .. note:: - When using the `db_default` attribute, the field value will be an instance of `DatabaseDefault` before the instance is saved to the database. This means that a `bool()` evaluation of the field will not reflect the specified `db_default` value until the instance is saved. + When using the ``db_default`` attribute, the field value will be an instance of ``DatabaseDefault`` before the instance is saved to the database. This means that a ``bool()`` evaluation of the field will not reflect the specified ``db_default`` value until the instance is saved. For example: @@ -721,7 +721,7 @@ isn't defined. my_obj.save() print(bool(my_obj.my_field)) # False, as expected. - To ensure the field value reflects the desired default before saving, also set the `default` attribute: + To ensure the field value reflects the desired default before saving, also set the ``default`` attribute: .. code-block:: python