Opened 6 years ago

Closed 6 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: UI/UX:

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 Changed 6 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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