Nicolas
Nicolas

Reputation: 444

Makemigration throwing error

I am trying to rebuild my database, using makemigrations, Django 2.0. I've made some significant changes to my model: Deleted the is_favorite and visit_specialty which were both variables in the model that I deleted. I tried the usual makemigrations, flush / sqlflush, deleted the sqlite database file, and removed all migration files (not the init.py file).

Despite this, any "migration" command I input results in the below-mentioned error.

SystemCheckError: System check identified some issues:

ERRORS:
<class 'myapp.admin.VisitAdmin'>: (admin.E108) The value of 
'list_display[4]' refers to 'visit_specialty', which is not a callable, 
an attribute of 'VisitAdmin', or an attribute or method on 'myapp.Visit'.
<class 'myapp.admin.VisitAdmin'>: (admin.E108) The value of 
'list_display[5]' refers to 'is_favorite', which is not a callable, an 
attribute of 'VisitAdmin', or an attribute or method on 'myapp.Visit'.

Upvotes: 0

Views: 256

Answers (1)

iklinac
iklinac

Reputation: 15748

You still have them in your admin.py ( myapp.admin.VisitAdmin) and that is why you get following error

You have still both fields in list_display

Upvotes: 1

Related Questions