summaryrefslogtreecommitdiff
path: root/django/db/models/fields/reverse_related.py
AgeCommit message (Collapse)Author
2026-04-22Fixed #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>
2025-03-31Refs #28909 -- Simplified code using unpacking generalizations.Aarni Koskela
2025-01-15Refs #16055 -- Removed get_joining_columns()/get_reverse_joining_columns() ↵Sarah Boyce
methods per deprecation timeline.
2024-08-28Refs #16055 -- Adjusted deprecation warning stacklevel in ↵Simon Charette
get_joining_columns()/get_reverse_joining_columns().
2024-05-21Fixed #35405 -- Converted get_cache_name into a cached property in ↵Adam Johnson
FieldCacheMixin. FieldCacheMixin is used by related fields to track their cached values. This work migrates get_cache_name() to be a cached property to optimize performance by reducing unnecessary function calls when working with related fields, given that its value remains constant. Co-authored-by: Simon Charette <charette.s@gmail.com> Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-02-19Refs #28011 -- Removed ForeignObjectRel.is_hidden().Adam Johnson
2024-02-19Fixed #35230 -- Added cached ForeignObjectRel.accessor_name.Adam Johnson
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-04-18Refs #16055 -- Deprecated ↵David Wobrock
get_joining_columns()/get_reverse_joining_columns() methods.
2023-04-18Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock
relation on PostgreSQL.
2023-03-28Fixed #34443 -- Fixed filtering by transforms on reverse relations.Mariusz Felisiak
Regression in ce6230aa976e8d963226a3956b45a8919215dbd8.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-11-03Fixed #32996 -- Cached PathInfos on relations.Keryn Knight
PathInfo values are ostensibly static over the lifetime of the object for which they're requested, so the data can be memoized, quickly amortising the cost over the process' duration.
2021-07-26Fixed #32947 -- Fixed hash() crash on reverse M2M relation when ↵Tom Wojcik
through_fields is a list. Regression in c32d8f33d8e988a376e44997b8f3606d821f305e.
2021-07-22Fixed #32951 -- Removed Query.where_class & co.Nick Pope
Unused since 3caf957ed5eaa831a485abcb89f27266dbf3e82b.
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-08-31Fixed #31952 -- Fixed EmptyFieldListFilter crash with reverse relationships.Federico Jaramillo Martínez
Thanks dacotagh for the report.
2019-10-23Fixed #29919 -- Fixed RelatedOnlyFieldListFilter crash with reverse ↵Dan Moore
relationships.
2019-08-15Fixed #30449 -- Fixed RelatedFieldListFilter/RelatedOnlyFieldListFilter to ↵zeyneloz
respect model's Meta.ordering. Regression in 6d4e5feb79f7eabe8a0c7c4b87f25b1a7f87ca0b. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2018-11-14Fixed #29835 -- Made RelatedFieldListFilter respect ModelAdmin.ordering.Hasan Ramezani
2018-09-25Normalized spelling of "lowercase" and "lowercased".Jon Dufresne
2017-09-22Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) ↵Nicolas Delaby
support. Thanks Anssi Kääriäinen for contributing to the patch.
2017-08-10Refs #16043 -- Refactored internal fields value cache.Paulo
* Removed all hardcoded logic for _{fieldname}_cache. * Added an internal API for interacting with the field values cache. Thanks carljm and MarkusH for support.
2017-06-05Replaced Model._get_pk_val() with pk property.Tim Graham
Model.pk was added after _get_pk_val() and many places weren't simplified.
2017-04-27Refs #27795 -- Replaced many force_text() with str()Claude Paroz
Thanks Tim Graham for the review.
2017-02-28Refs #27656 -- Updated django.db docstring verbs according to PEP 257.Anton Samarchyan
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Removed Field.rel and Field.remote_field.to per deprecation timeline.Tim Graham
2016-09-03Replaced smart_* by force_* calls whenever possibleClaude Paroz
The smart_* version should only be used when a lazy string should keep its lazy status.
2016-05-04Fixed #22936 -- Obsoleted Field.get_prep_lookup()/get_db_prep_lookup()Claude Paroz
Thanks Tim Graham for completing the initial patch.
2016-04-22Removed unused ForeignObjectRel.get_choices() limit_to_currently_related ↵Tim Graham
argument. Unused since its introduction in dc334a2ba8dbf5134d65c97fea2785c3b2294ef5.
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-02-27Fixed #26230 -- Made default_related_name affect related_query_name.chenesan
2015-10-16Fixed #25560 -- Made empty string related_name invalid.Simon Charette
Thanks to Ali Lotfi for the initial report and patch and Tim Graham for the review.
2015-09-21Documented "rel objects".Aymeric Augustin
Kept the docstring short because these objects aren't very well defined and they're in the crosshairs of several refactorings.
2015-09-21Fixed #22341 -- Split django.db.models.fields.related.Aymeric Augustin
At 2800 lines it was the largest module in the django package. This commit brings it down to a more manageable 1620 lines. Very small changes were performed to uniformize import style.