質問編集履歴
1
Markdown記法への修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,20 +1,35 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
### 前提・実現したいこと
|
1
6
|
プログラミング初心者です。
|
2
7
|
|
3
8
|
Djangoのチュートリアル「はじめての Django アプリ作成、その2」を進めています。
|
4
|
-
そのチュートリアル内で、adminサイトにログインできるユーザーを作成するコマンド「py manage.py createsuperuser」を入力したときに、
|
9
|
+
そのチュートリアル内で、adminサイトにログインできるユーザーを作成するコマンド「py manage.py createsuperuser」を入力したときに、エラーが表示されました。
|
5
10
|
どんな原因が考えられるでしょうか。
|
6
|
-
|
7
|
-

|
8
|
-
|
9
|
-
一度作成したすべてのディレクトリを削除して、「チュートリアル その1」の最初からすべてやり直しましたが、上記と全く同じエラーが表示されます。
|
10
11
|
|
11
12
|
エラー表記の{「polls.question」はすでに登録されています。}ということは、すでにユーザー登録されているということを指しているのでしょうか。
|
12
13
|
|
13
14
|
ご回答のほど、よろしくお願いいたします。
|
15
|
+
### 発生している問題・エラーメッセージ
|
14
16
|
|
17
|
+
```
|
18
|
+
RuntimeWarning: Model 'polls.question' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models.
|
19
|
+
new_class._meta.apps.register_model(new_class._meta.app_label, new_class)
|
20
|
+
SystemCheckError: System check identified some issues:
|
21
|
+
|
22
|
+
ERRORS:
|
23
|
+
polls.Choice.question: (fields.E300) Field defines a relation with model 'Question', which is either not installed, or is abstract.
|
24
|
+
```
|
25
|
+
### 試したこと
|
26
|
+
|
27
|
+
一度作成したすべてのディレクトリを削除して、「チュートリアル その1」の最初からすべてやり直しましたが、上記と全く同じエラーが表示されます。
|
28
|
+
|
29
|
+
### 補足情報(FW/ツールのバージョンなど)
|
15
30
|
使用環境
|
16
31
|
OS:Windows11 x64
|
17
32
|
Python:ver3.10.2
|
18
33
|
Django:ver4.0.2
|
19
34
|
Visual Studio Code: ver1.64.2
|
20
|
-
|
35
|
+
|