Opened 9 years ago

Closed 8 years ago

Last modified 5 years ago

#6935 closed (fixed)

inspectdb should handle table names with spaces.

Reported by: Adam Vandenberg Owned by: Jeremy Dunck
Component: django-admin.py inspectdb Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Some databases allow tables with spaces in the name, assuming that these table names are properly quoted in queries. (MS Sql Server, for example.)

The table-name-to-python-class-name lambda in inspectdb isn't handling spaces, which is generating invalid python class names.

This patch address that issue.

Attachments (1)

handle-table-name-spaces.diff (614 bytes) - added by Adam Vandenberg 9 years ago.

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by Adam Vandenberg

comment:1 Changed 8 years ago by Marc Fargas

Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by anonymous

#7285 is the same problem with field names and dashes.

comment:3 Changed 8 years ago by Jeremy Dunck

milestone: 1.0

comment:4 Changed 8 years ago by Jeremy Dunck

Owner: changed from nobody to Jeremy Dunck

comment:5 Changed 8 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [8403]) Fixed #6935: Modified inspectdb to provide better handling for table names with spaces. Thanks to adamv for the report and patch.

comment:6 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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