summaryrefslogtreecommitdiff
path: root/django/db/models/fields
AgeCommit message (Collapse)Author
2020-12-30Fixed #32294 -- Prevented ManyToManyField's hidden related name collisions ↵manav014
between apps.
2020-12-29Added app labels to related fields checks messages E302-E305.Mariusz Felisiak
2020-12-29Used model's Options.label where applicable.Mariusz Felisiak
Follow up to b7a3a6c9ef0a89625881b47594120bca55fa2e49.
2020-12-11Fixed #32252 -- Fixed __isnull=True on key transforms on SQLite and Oracle.sage
__isnull=True on key transforms should not match keys with NULL values.
2020-12-07Removed lhs_only argument from KeyTransform.preprocess_lhs().sage
2020-11-25Fixed #32203 -- Fixed QuerySet.values()/values_list() crash on key ↵sage
transforms with non-string values on SQLite. Thanks Gordon Wrigley for the report.
2020-11-24Simplified JSONField key transforms by using JSON_OBJECT() on Oracle.Mariusz Felisiak
2020-11-10Fixed #32182 -- Fixed crash of JSONField nested key transforms with subquery ↵Hannes Ljungberg
annotations on PostgreSQL.
2020-11-02Fixed #32132 -- Fixed column types in m2m intermediary tables for ↵David-Wobrock
Positive(Big/Small)IntegerFields.
2020-10-15Refs #32096 -- Made JSONField check respect Meta.required_db_vendor.Mariusz Felisiak
Thanks Simon Charette for the implementation idea.
2020-10-14Refs #32096 -- Fixed __in lookup crash against key transforms for JSONField.Mariusz Felisiak
Regression in 6789ded0a6ab797f0dcdfa6ad5d1cfa46e23abcd and 1251772cb83aa4106f526fe00738e51c0eb59122. Thanks Simon Charette and Igor Jerosimić for the report.
2020-10-12Fixed #32098 -- Made FieldFile use FileField.attname.Sultan
After a93425a37f4defdb31d4ca96bb3bf6da21f0b5ce FileDescriptor is a subclass of DeferredAttribute and uses FileField.attname to access the field data, so that custom subclasses can not only save data to files, but also represent the same data with a different data type by attaching FileFiled.name to a particular descriptor. Follow up to a93425a37f4defdb31d4ca96bb3bf6da21f0b5ce.
2020-10-06Refs #20577 -- Deferred filtering of prefetched related querysets by reverse ↵Bob Renwick
m2o relation.
2020-10-05Refs #31926 -- Fixed reverse related identity crash on Q() limit_choices_to.Simon Charette
2020-10-05Fixed #31926 -- Fixed recreating queryset with FilteredRelation when using a ↵David-Wobrock
pickled Query. In a pickled join, the join_fields had the same values, but weren't the same object (contrary to when not pickling the QuerySet).
2020-09-21Fixed #31777 -- Added support for database collations to Char/TextFields.Tom Carrick
Thanks Simon Charette and Mariusz Felisiak for reviews.
2020-09-09Fixed #31750 -- Made models.Field equality compare models for inherited fields.Ryan Hiebert
2020-09-02Fixed #31941 -- Corrected FileField.deconstruct() with a callable storage.Brian Helba
2020-08-31Fixed #31952 -- Fixed EmptyFieldListFilter crash with reverse relationships.Federico Jaramillo Martínez
Thanks dacotagh for the report.
2020-08-28Fixed #31956 -- Fixed crash of ordering by JSONField with a custom decoder ↵Mariusz Felisiak
on PostgreSQL. Thanks Marc Debureaux for the report. Thanks Simon Charette, Nick Pope, and Adam Johnson for reviews.
2020-08-26Fixed #31936 -- Fixed __in lookup on key transforms for JSONField.Mariusz Felisiak
This resolves an issue on databases without a native JSONField (MariaDB, MySQL, SQLite, Oracle), where values must be wrapped. Thanks Sébastien Pattyn for the report.
2020-07-30Removed unnecessary list() call in RelatedManager.add().Sergey Fedoseev
2020-07-30Bumped minimum isort version to 5.1.0.David Smith
Fixed inner imports per isort 5. isort 5.0.0 to 5.1.0 was unstable.
2020-07-28Fixed #31829 -- Used JSONField __contains lookup on key transforms.sage
2020-07-28Fixed #31836 -- Dropped support for JSONField __contains and __contained_by ↵Mariusz Felisiak
lookups on SQLite. The current implementation works only for basic examples without supporting nested structures and doesn't follow "the general principle that the contained object must match the containing object as to structure and data contents, possibly after discarding some non-matching array elements or object key/value pairs from the containing object".
2020-07-28Fixed #31835 -- Dropped support for JSONField __contains lookup on Oracle.Mariusz Felisiak
The current implementation works only for basic examples without supporting nested structures and doesn't follow "the general principle that the contained object must match the containing object as to structure and data contents, possibly after discarding some non-matching array elements or object key/value pairs from the containing object".
2020-07-24Fixed #31812 -- Fixed FileField.model for fields defined in abstract models.Matthias Kestenholz
Regression in a93425a37f4defdb31d4ca96bb3bf6da21f0b5ce.
2020-06-30Fixed #31701 -- Made FileDescriptor subclass DeferredAttribute.alosultan
2020-06-26Fixed #31742 -- Fixed makemigrations crash on ForeignKey to an app with ↵Mariusz Felisiak
mixed case label. Regression in 9e1b6b8a66af4c2197e5b1b41eb9dbb36e4f6502. Thanks Ignacio Santolin for the report.
2020-06-25Fixed #31596 -- Changed ForeignKey.validate() to use the base manager.Jon Dufresne
2020-06-15Fixed #31706 -- Removed unnecessary getattr() call in FileDescriptor.__get__().Sultan
refresh_from_db() loads fields values.
2020-06-05Fixed #31663 -- Made DecimalField.to_python() handle non-numeric invalid values.Sasha Pachev
2020-05-08Fixed #12990, Refs #27694 -- Added JSONField model field.sage
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael Michel for mentoring this Google Summer of Code 2019 project and everyone else who helped with the patch. Special thanks to Mads Jensen, Nick Pope, and Simon Charette for extensive reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-04-27Removed unnecessary tuple wrapping of single format string argument.François Freitag
2020-04-24Refs #31369 -- Deprecated models.NullBooleanField in favor of ↵Tim Schilling
BooleanField(null=True).
2020-04-08Fixed #28184 -- Allowed using a callable for FileField and ImageField storage.miigotu
2020-03-25Fixed #23916 -- Allowed makemigrations to handle related model name case ↵Adam Johnson
changes. Made autodetector ignore related model name case changes so unnecessary migrations are not created.
2020-02-28Fixed #31310 -- Fixed hints in checks for using intermediate model with ↵Matheus Cunha Motta
ambiguous foreign key. symmetrical=False is not required since 87b1ad6e7351464c60e751b483d9dfce3a2d3382.
2020-02-27Fixed #31185 -- Fixed detecting of unique fields in ForeignKey/ForeignObject ↵Valze
checks when using Meta.constraints.
2020-02-24Fixed #31286 -- Made database specific fields checks databases aware.Taoup
Follow up to 0b83c8cc4db95812f1e15ca19d78614e94cf38dd.
2020-02-18Refs #31282 -- Clarified M2O add/remove/set with PK behaviour.Carlton Gibson
Improved error message for remove() and added tests.
2020-02-17Fixed #31277 -- Relaxed system check of m2m intermediary tables for db_table ↵Xavier Francisco
collision when database routers are installed. Turned the error into a warning when database routers are installed.
2020-02-05Fixed #26813 -- Prevented empty choice in ModelChoiceField with RadioSelect ↵Hasan Ramezani
for fields with blank=False.
2020-01-31Cached ForeignObject.(local/foreign/reverse)_related_fields properties.Adam Johnson
2020-01-31Fixed 31207 -- Prevented references to non-local remote fields in ↵Hasan Ramezani
ForeignKey.to_field. Thanks Simon Charette for the initial patch and review.
2020-01-16Used constant instead of hard-coded value for recursive relationship.Adam Johnson
2020-01-15Fixed #31124 -- Fixed setting of get_FOO_display() when overriding inherited ↵Carlton Gibson
choices. Regression in 2d38eb0ab9f78d68c083a5b78b1eca39027b279a
2020-01-11Fixed #31155 -- Fixed a system check for the longest choice when a named ↵Mariusz Felisiak
group contains only non-string values. Regression in b6251956b69512bf230322bd7a49b629ca8455c6. Thanks Murat Guchetl for the report.
2020-01-09Fixed #21238 -- Fixed restoring attributes when pickling FileField and ↵Hasan Ramezani
ImageField.
2019-12-19Fixed #31095 -- Made RelatedManager.set() preserve existing m2m relations ↵Hasan Ramezani
with an invalid type.