Opened 7 months ago

Last modified 7 months ago

#21079 new Bug

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: Accepted
Has patch: no 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.

Attachments (0)

Change History (2)

comment:1 Changed 7 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.