mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #22207 -- Added support for GenericRelation reverse lookups
GenericRelation now supports an optional related_query_name argument. Setting related_query_name adds a relation from the related object back to the content type for filtering, ordering and other query operations. Thanks to Loic Bistuer for spotting a couple of important issues in his review.
This commit is contained in:
committed by
Anssi Kääriäinen
parent
c627da0ccc
commit
b77f26313c
@@ -1165,6 +1165,11 @@ Miscellaneous
|
||||
* The ``shortcut`` view in ``django.contrib.contenttypes.views`` now supports
|
||||
protocol-relative URLs (e.g. ``//example.com``).
|
||||
|
||||
* :class:`~django.contrib.contenttypes.fields.GenericRelation` now supports an
|
||||
optional ``related_query_name`` argument. Setting ``related_query_name`` adds
|
||||
a relation from the related object back to the content type for filtering,
|
||||
ordering and other query operations.
|
||||
|
||||
.. _deprecated-features-1.7:
|
||||
|
||||
Features deprecated in 1.7
|
||||
|
||||
Reference in New Issue
Block a user