Ticket #16536: inspectdb_numeric_fields_16536_2.diff
File inspectdb_numeric_fields_16536_2.diff, 963 bytes (added by , 13 years ago) |
---|
-
django/core/management/commands/inspectdb.py
101 101 att_name += '_field' 102 102 comment_notes.append('Field renamed because it was a Python reserved word.') 103 103 104 if att_name.isdigit(): 105 att_name = 'number_%d' % int(att_name) 106 extra_params['db_column'] = unicode(column_name) 107 comment_notes.append('Field renamed because it wasn\'t a \ 108 valid Python identifier') 109 104 110 # Don't output 'id = meta.AutoField(primary_key=True)', because 105 111 # that's assumed if it doesn't exist. 106 112 if att_name == 'id' and field_type == 'AutoField(' and extra_params == {'primary_key': True}: