Hello!
Caught the error from the header. Its meaning is clear, but it arises not in my code, but deep in the root of Django (version 1.11 python 2.7): I attach a screenshot 
It appeared when I renamed the Friendship model to Friends. Renamed the name of the table in the database, as well as its name in the django_content_type table. Removed migration files, deleted all pyc files in my project. Attempting makemigrations and migrate is the same error. Restart - the same error. It’s as if django has cached the name of this model somewhere and can’t do anything about it.
How to catch this error?