[Answer]-Django BD error

1👍

The radiotipo_idradiotipo is a foreign key to a model called “RadioInfo”, but you don’t have any model called that: only one called “Radiotipo”. Is that the one you meant?

0👍

Change:

radiotipo_idradiotipo = models.ForeignKey('Radioinfo', db_column='radioInfo_idRADIOINFO')  # Field name made lowercase.

By:

radiotipo_idradiotipo = models.ForeignKey('Radiotipo', db_column='radioInfo_idRADIOINFO')  # Field name made lowercase.

Notice that you are using the table_name instead of the Model_Name for the foreingkey

👤Yasel

Leave a comment