Opened 11 years ago

Closed 10 years ago

#21079 closed Bug (fixed)

Inspectdb doesn't properly translate database table names to valid python names

Reported by: Michael Manfre Owned by: nobody
Component: Core (Management commands) Version: 1.5
Severity: Normal Keywords: inspectdb
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Given a database with a table named Some.Table, inspectdb will generate a model named Some.Table, instead of something with a valid Python syntax. The same issue was possible with column names in Django 1.4, but was subsequently changed to provide better normalization of column names. The same should happen for table names.

Change History (5)

comment:1 by Tim Graham, 11 years ago

Triage Stage: UnreviewedAccepted

Do you have a link to the commit that fixed this for column names? That would be a helpful reference in implementing this.

comment:4 by Tim Graham, 10 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: newclosed

In b144bfb5ce1e3e283c7fddac29a4653c6bc7fb3f:

Fixed #21079 -- Further normalized table names in inspectdb

Thanks Michael Manfre for the report and Tim Graham for the review.

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