Ticket #7285: inspectdb_replace_dash.diff

File inspectdb_replace_dash.diff, 722 bytes (added by jbronn, 7 years ago)

Replaces table name dashes with underscores.

  • django/core/management/commands/inspectdb.py

     
    4343            except NotImplementedError:
    4444                indexes = {}
    4545            for i, row in enumerate(introspection_module.get_table_description(cursor, table_name)):
    46                 att_name = row[0].lower()
     46                att_name = row[0].lower().replace('-', '_')
    4747                comment_notes = [] # Holds Field notes, to be displayed in a Python comment.
    4848                extra_params = {}  # Holds Field parameters such as 'db_column'.
    4949
Back to Top