| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2026-04-22 | Fixed #35870 -- Made blank choice label in forms more accessible. | Annabelle Wiegart | |
| Added new constant django.db.models.fields.BLANK_CHOICE_LABEL for an accessible and translatable blank choice label in forms. Deprecated django.db.models.fields.BLANK_CHOICE_DASH constant. Added the immediately deprecated transitional setting USE_BLANK_CHOICE_DASH. Co-Authored-By: Marijke Luttekes <mail@marijkeluttekes.dev> | |||
| 2026-03-12 | Fixed #36727 -- Deprecated Field.get_placeholder in favor of ↵ | Simon Charette | |
| get_placeholder_sql. The lack of ability of the get_placeholder call chain to return SQL and parameters separated so they can be mogrified by the backend at execution time forced implementations to dangerously interpolate potentially user controlled values. The get_placeholder_sql name was chosen due to its proximity to the previous method, but other options such as Field.as_sql were considered but ultimately rejected due to its different input signature compared to Expression.as_sql that might have lead to confusion. There is a lot of overlap between what Field.get_db_prep_value and get_placeholder_sql do but folding the latter in the former would require changing its return signature to return expression which is a way more invasive change than what is proposed here. Given we always call get_db_prep_value it might still be an avenue worth exploring in the future to offer a publicly documented interface to allow field to take an active part in the compilation chain. Thanks Jacob for the review. | |||
| 2024-09-18 | Fixed #35766 -- Handled slices in BaseChoiceIterator. | Sarah Boyce | |
| 2023-09-14 | Fixed #24561 -- Added support for callables on model fields' choices. | Natalia | |
| 2023-08-30 | Fixed #31262 -- Added support for mappings on model fields and ↵ | Nick Pope | |
| ChoiceField's choices. | |||
| 2023-08-22 | Added tests for model field's choices iterator/iterable values. | Natalia | |
| 2023-03-21 | Fixed #34388 -- Allowed using choice enumeration types directly on model and ↵ | T. Franzel | |
| form fields. | |||
| 2022-04-14 | Relaxed some query ordering assertions in various tests. | Mariusz Felisiak | |
| It accounts for differences seen on MySQL with MyISAM storage engine. | |||
| 2022-02-07 | Refs #33476 -- Reformatted code with Black. | django-bot | |
| 2022-01-14 | Fixed #33441 -- Restored immutability of models.Field.__hash__(). | Adam Johnson | |
| Regression in 502e75f9ed5476ffe8229109acf0c23999d4b533. | |||
| 2021-01-14 | Refs #31369 -- Removed models.NullBooleanField per deprecation timeline. | Mariusz Felisiak | |
| 2020-09-09 | Fixed #31750 -- Made models.Field equality compare models for inherited fields. | Ryan Hiebert | |
| 2020-01-15 | Fixed #31124 -- Fixed setting of get_FOO_display() when overriding inherited ↵ | Carlton Gibson | |
| choices. Regression in 2d38eb0ab9f78d68c083a5b78b1eca39027b279a | |||
| 2019-11-04 | Fixed #30931 -- Restored ability to override Model.get_FIELD_display(). | Carlton Gibson | |
| Thanks Sergey Fedoseev for the implementation idea. Regression in a68ea231012434b522ce45c513d84add516afa60. | |||
| 2019-10-23 | Fixed #29919 -- Fixed RelatedOnlyFieldListFilter crash with reverse ↵ | Dan Moore | |
| relationships. | |||
| 2019-10-23 | Added tests for Field.get_choices()'s limit_choices_to argument. | Dan Moore | |
| 2019-08-15 | Fixed #30449 -- Fixed RelatedFieldListFilter/RelatedOnlyFieldListFilter to ↵ | zeyneloz | |
| respect model's Meta.ordering. Regression in 6d4e5feb79f7eabe8a0c7c4b87f25b1a7f87ca0b. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com> | |||
| 2019-03-23 | Removed redundant model field choices tests. | Matthias Kestenholz | |
| 2019-01-30 | Fixed #30076 -- Added Model.get_FOO_display() even if field's choices are empty. | Joshua Cannon | |
| 2018-11-27 | Switched TestCase to SimpleTestCase where possible in Django's tests. | Tim Graham | |
| 2018-11-14 | Fixed #29835 -- Made RelatedFieldListFilter respect ModelAdmin.ordering. | Hasan Ramezani | |
| 2018-04-20 | Fixed #29247 -- Allowed blank model field choice to be defined in nested ↵ | orlnub123 | |
| choices. | |||
| 2018-04-20 | Moved tests for model Field.get_choices(). | Tim Graham | |
| 2017-06-26 | Removed unnecessary empty parentheses in class definitions. | Jon Dufresne | |
| 2017-06-14 | Fixed #27914 -- Added support for nested classes in ↵ | chillaranand | |
| Field.deconstruct()/__repr__(). | |||
| 2017-05-11 | Fixed #28188 -- Fixed crash when pickling model fields. | Tim Graham | |
| Regression in d2a26c1a90e837777dabdf3d67ceec4d2a70fb86. Thanks Adam Alton for the report and test, and Adam Johnson for suggesting the fix. | |||
| 2017-03-23 | Fixed #27969 -- Fixed models.Field.formfield() setting 'disabled' for fields ↵ | Kapil Garg | |
| with choices. | |||
| 2017-01-17 | Refs #26154 -- Removed deprecated CommaSeparatedIntegerField. | Tim Graham | |
| 2016-12-14 | Fixed #27599 -- Fixed Field.__str__() crash for fields not attached to models. | Morgan Aubert | |
| 2016-12-14 | Moved test_field_ordering to the model_fields package. | Morgan Aubert | |
| 2016-06-16 | Fixed #26747 -- Used more specific assertions in the Django test suite. | Jon Dufresne | |
| 2016-03-23 | Split model_fields tests into different files. | Tim Graham | |
| 2016-02-29 | Fixed #26186 -- Documented how app relative relationships of abstract models ↵ | Simon Charette | |
| behave. This partially reverts commit bc7d201bdbaeac14a49f51a9ef292d6312b4c45e. Thanks Tim for the review. Refs #25858. | |||
| 2016-01-29 | Refs #26022 -- Used context manager version of assertRaises in tests. | Hasan | |
| 2016-01-11 | Fixed #25858 -- Bound abstract model application relative relationships. | Simon Charette | |
| Thanks to Karl Hobley for the report and Markus, Shai, Aymeric for their input and Tim for the review. | |||
| 2016-01-06 | Fixed #25746 -- Isolated inlined test models registration. | Simon Charette | |
| Thanks to Tim for the review. | |||
| 2015-12-05 | Fixed #25547 -- Made Model.refresh_from_db() update FileField's instance. | Attila Tovt | |
| 2015-11-24 | Fixed #25767 -- Fixed data truncation possibility with ↵ | George Marshall | |
| Positive(Small)IntegerField on MySQL. | |||
| 2015-09-22 | Fixed #24509 -- Added Expression support to SQLInsertCompiler | Alex Hill | |
| 2015-09-18 | Fixed #24636 -- Added model field validation for decimal places and max digits. | Iulia Chiriac | |
| 2015-08-31 | Fixed #25331 -- Removed trailing blank lines in docstrings. | Maxime Lorant | |
| 2015-08-03 | Removed unused Field.get_flatchoices() method. | Tim Graham | |
| Unused since c2ba59fc1da5287d6286e2c2aca4083d5bafe056 (Django 1.0). Thanks Andy Baker for the report. | |||
| 2015-07-27 | Fixed #21127 -- Started deprecation toward requiring on_delete for ↵ | Flavio Curella | |
| ForeignKey/OneToOneField | |||
| 2015-07-17 | Fixed #16501 -- Added an allow_unicode parameter to SlugField. | Edward Henderson | |
| Thanks Flavio Curella and Berker Peksag for the initial patch. | |||
| 2015-06-15 | Fixed flake8 warnings on Python 3. | Tim Graham | |
| 2015-06-04 | Fixed #24677 -- Made TextField.to_python() return a string. | Rolo | |
| This is consistent with CharField. | |||
| 2015-06-02 | Fixed #9596 -- Added date transform for DateTimeField. | Jon Dufresne | |
| 2015-05-20 | Refs #24652 -- Used SimpleTestCase where appropriate. | Simon Charette | |
| 2015-04-28 | Fixed #24714 -- Used more specific assertions than assertEqual in tests. | Alasdair Nicol | |
| 2015-04-15 | Fixed model_fields tests to use django TestCase. | Jon Dufresne | |
