[patch] add handling of column names with spaces to inspectdb
|Reported by:||Karen Tracey <graybark@…>||Owned by:||adrian|
|Component:||Database layer (models, ORM)||Version:|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
inspectdb does not currently notice when a database table contains a column with embedded spaces in the name. Translating such a name directly to a field name causes a syntax error since a field name cannot contain spaces. I've got a patch that fixes this by simply removing the spaces in the generated name. db_column is set just as it is for DB column names that duplicate Python reserved words.