Reputation: 998
I am using Django 1.8, python3, SQLite.
I had a model with a foreign key that referenced another model. I updated the model to remove that foreign key completely and replaced it with a many-to-many key that referenced a different table. I ran makemigrations and then ran the actual migration without errors. However, when I go into admin and try to add a row to that table I get the following error:
Exception Type: FieldError
Exception Value:
Unknown field(s) (TheOneIDeleted) specified for TableIChanged. Check fields/fieldsets/exclude attributes of class TableIChangedAdmin.
Why is there still a reference to the deleted field after the migration? More importantly, how can I fix it?
Upvotes: 0
Views: 769
Reputation: 309089
It looks like you have updated your models.py, but haven't updated the model admin in your admin.py.
Upvotes: 2