[1.8.x] Amended get_all_related_objects() backwards compatible replacement.

Backport of d84f01ff08 from master
This commit is contained in:
Neal Todd 2015-04-20 13:06:35 +01:00 committed by Tim Graham
parent b8f203b3f2
commit b39c970cfe
1 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ can be made to convert your code to the new API:
[
f for f in MyModel._meta.get_fields()
if f.one_to_many and f.auto_created
if (f.one_to_many or f.one_to_one) and f.auto_created
]
* ``MyModel._meta.get_all_related_objects_with_model()``::
@ -248,7 +248,7 @@ can be made to convert your code to the new API:
[
(f, f.model if f.model != MyModel else None)
for f in MyModel._meta.get_fields()
if f.one_to_many and f.auto_created
if (f.one_to_many or f.one_to_one) and f.auto_created
]
* ``MyModel._meta.get_all_related_many_to_many_objects()``::