Opened 9 years ago

Last modified 6 years ago

#17814 new New feature

Add a way to override related_name on models that you can't edit

Reported by: yanchenko.igor@… Owned by: nobody
Component: Database layer (models, ORM) Version:
Severity: Normal Keywords:
Cc: slav0nic0@… Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no


I use external apps with same name models (for example it's and and have conflict with related_name, both have

user = models.ForeignKey(User, related_name="posts")

I writed patch with principle like ABSOLUTE_URL_OVERRIDES

Attachments (1)

concept.patch (1.9 KB) - added by yanchenko.igor@… 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by yanchenko.igor@…

Attachment: concept.patch added

comment:1 Changed 9 years ago by Carl Meyer

Needs documentation: set
Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

I really hate the use of a setting for this (despite the precedent of ABSOLUTE_URL_OVERRIDES, which I don't like either). I do think it's a problem that Django should provide some answer for, so accepting the ticket on that basis. I can't immediately think of a better solution than the setting, but I hope we can think of one.

comment:2 Changed 9 years ago by anonymous

possible settings are not the best place for this, but this is the most obvious place, if I meet the discrepancy with the code model, I would like to find it in the settings, but not in another application.

comment:3 Changed 9 years ago by Sergey Maranchuk

Cc: slav0nic0@… added

comment:4 Changed 6 years ago by Tim Graham

Summary: RELATED_NAME_OVERRIDESAdd a way to override related_name on models that you can't edit
Note: See TracTickets for help on using tickets.
Back to Top