Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#6935 closed (fixed)

inspectdb should handle table names with spaces.

Reported by: adamv Owned by: jdunck
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 adamv 7 years ago.

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by adamv

comment:1 Changed 7 years ago by telenieko

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

comment:2 Changed 7 years ago by anonymous

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

comment:3 Changed 7 years ago by jdunck

  • milestone set to 1.0

comment:4 Changed 7 years ago by jdunck

  • Owner changed from nobody to jdunck

comment:5 Changed 7 years ago by russellm

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

(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 4 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

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