Ticket #15076: inspectdb_15194.diff
File inspectdb_15194.diff, 833 bytes (added by , 14 years ago) |
---|
-
django/core/management/commands/inspectdb.py
76 76 comment_notes.append('Field name made lowercase.') 77 77 78 78 if i in relations: 79 rel_to = relations[i][1] == table_name and " 'self'" or table2model(relations[i][1])80 field_type = 'ForeignKey(%s'% rel_to79 rel_to = relations[i][1] == table_name and "self" or table2model(relations[i][1]) 80 field_type = "ForeignKey('%s'" % rel_to 81 81 if att_name.endswith('_id'): 82 82 att_name = att_name[:-3] 83 83 else: