Opened 16 years ago

Closed 15 years ago

#11179 closed (wontfix)

inspectdb should guess related_name on foreign keys

Reported by: 3gun Owned by: nobody
Component: django-admin.py inspectdb Version: 1.0
Severity: Keywords: related_name
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be useful if inspectdb would guess related_name parameter on foreign keys using db_table, db_column and othermodel attributes.

Accessor for field 'xxx' clashes with related field 'YYY.zzz_set'. Add a related_name argument to the definition for 'xxx'.
Accessor for field 'aaa' clashes with related field 'YYY.zzz_set'. Add a related_name argument to the definition for 'aaa'.

Thnx

Change History (1)

comment:1 by Alex Gaynor, 15 years ago

Resolution: wontfix
Status: newclosed

Django gives a clear error message here, there's no sense in making inspectdb more fragile by causing it to guess at more things.

Note: See TracTickets for help on using tickets.
Back to Top