makemigarionsしようとしたらなんかエラー出た
ValueError: The field admin.LogEntry.user was declared with a lazy reference to 'accounts.user', but app 'accounts' isn't installed.
なんじゃこれ?
そもそもaccountsというアプリは作っていないし、AUTH_USER_MODELにもそんな表記はしていない。
settings.py
を見てうんうん悩みましたが、結果分からなかったのでググりました。
ググった結果
まずヒットしたのはStackOverFlow。
ValueError: The field admin.LogEntry.user was declared with a lazy reference
回答に選ばれていたのは全部のmigrationsファイル消してもう一回やったら上手くいくよ!
最初のmakemigrationsでつまずいているのでこれは違う。
次のは一旦AUTH_USER_MODELを消して新しいテーブル作って、それでまたAUTH_USER_TABLE追加してください,
とのこと。
そもそもAUTH_USER_TABLEを表記していないのでこれも違う。
それぞれ色々試した結果、Redditに気になる回答が
Getting Errors When Running "Makemigrations"
私はvirtualenv作り直したら上手くいったよ
なるほど。ということで試したら見事に上手くいきました。
困っている方がいたら是非試してみてください!