Changes between Initial Version and Version 1 of Ticket #24208, comment 2
- Timestamp:
- Jan 23, 2015, 5:11:14 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24208, comment 2
initial v1 1 1 Workaround - `.related_model` will return the source model, so... 2 2 3 {{{ 3 4 for relation in opts.get_all_related_objects(): 4 5 to_model = getattr(relation, 'related_model', relation.model) 6 }}} 5 7 6 8 Appears to work consistently across Django versions.