Ticket #16536: inspectdb_numeric_fields_16536.diff
File inspectdb_numeric_fields_16536.diff, 884 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' % att_name 106 comment_notes.append('Field renamed because it wasn\'t a \ 107 valid Python identifier') 108 104 109 # Don't output 'id = meta.AutoField(primary_key=True)', because 105 110 # that's assumed if it doesn't exist. 106 111 if att_name == 'id' and field_type == 'AutoField(' and extra_params == {'primary_key': True}: