What does related_name on a ForeignKey control?
- A The database column name
- B The attribute used for the reverse relation from the related model
- C The display name in the admin
- D The ordering of results
Answer
The attribute used for the reverse relation from the related model
Without it, Django uses modelname_set. A clear related_name makes reverse queries far more readable.





