前提・実現したいこと
プログラミング初心者です。
Djangoのチュートリアル「はじめての Django アプリ作成、その2」を進めています。
そのチュートリアル内で、adminサイトにログインできるユーザーを作成するコマンド「py manage.py createsuperuser」を入力したときに、エラーが表示されました。
どんな原因が考えられるでしょうか。
エラー表記の{「polls.question」はすでに登録されています。}ということは、すでにユーザー登録されているということを指しているのでしょうか。
ご回答のほど、よろしくお願いいたします。
発生している問題・エラーメッセージ
RuntimeWarning: Model 'polls.question' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) SystemCheckError: System check identified some issues: ERRORS: polls.Choice.question: (fields.E300) Field defines a relation with model 'Question', which is either not installed, or is abstract.
試したこと
一度作成したすべてのディレクトリを削除して、「チュートリアル その1」の最初からすべてやり直しましたが、上記と全く同じエラーが表示されます。
補足情報(FW/ツールのバージョンなど)
使用環境
OS:Windows11 x64
Python:ver3.10.2
Django:ver4.0.2
Visual Studio Code: ver1.64.2
回答1件
あなたの回答
tips
プレビュー