Changes between Initial Version and Version 1 of Ticket #30894, comment 2
- Timestamp:
- Oct 22, 2019, 2:26:49 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30894, comment 2
initial v1 1 1 OK, yes. Your models work the same. It's the presence of the `related_query_name` which causes the failure. Remove it and it works, because (as per the docs) `related_query_name` defaults to `related_name` if that's set. 2 2 3 At best this is a documentation cleanup/optimization **but** setting `related_query_name` explicitly is a nmuch more specialised use case than setting `related_name`. I think the `related_query_name` docs are clear enough that setting it overrides the name of the reverse filter, and that a ''clarification'' in the `select_related()` docs would only muddy the water for the majority of users. (One should under the consequences before setting `related_query_name`.)3 At best this is a documentation cleanup/optimization **but** setting `related_query_name` explicitly is a much more specialised use case than setting `related_name`. I think the `related_query_name` docs are clear enough that setting it overrides the name of the reverse filter, and that a ''clarification'' in the `select_related()` docs would only muddy the water for the majority of users. (One should under the consequences before setting `related_query_name`.)