#21079 closed Bug (fixed)

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

Reported by: 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

Description

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 Changed 22 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 12 months ago by timo

  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 12 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

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