質問編集履歴

2

文章とコードの補正

2021/12/28 12:05

投稿

jaogjig
jaogjig

スコア21

test CHANGED
File without changes
test CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
 
4
4
 
5
- ここに質問の内容を詳しく書いてください。
6
-
7
5
  財務諸表の分析を自動化するサイトを作っています。
8
6
 
9
- signup機能を作いる間に以下のエラーが発生しました。
7
+ signup機能を作り終わりました。そこで、ユーザー名とパスワードの両方を”123”入れ新規登録ボタンを押したところ以下のエラーが発生しました。
10
8
 
11
9
 
12
10
 
13
11
  ### 発生している問題・エラーメッセージ
14
12
 
13
+ エラーメッセージ
14
+
15
15
 
16
16
 
17
17
  qlalchemy.exc.OperationalError: (sqlite3.OperationalError) table user has no column named user_name
@@ -22,10 +22,60 @@
22
22
 
23
23
  (Background on this error at: https://sqlalche.me/e/14/e3q8)
24
24
 
25
-
25
+ となっています。
26
26
 
27
27
  ### 該当コード
28
28
 
29
+ ```signup
30
+
31
+ .html
32
+
33
+ <!DOCTYPE html>
34
+
35
+ <html lang="ja">
36
+
37
+ <head>
38
+
39
+ <meta charset="UTF-8">
40
+
41
+ <title>singup</title>
42
+
43
+ <link rel="stylesheet" type="text/css" href="stylesheets/design.css">
44
+
45
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
46
+
47
+ </head>
48
+
49
+ <body>
50
+
51
+ <h1>ユーザー登録</h1>
52
+
53
+ <a href="/login">ログイン画面に戻る</a>
54
+
55
+ <form method="POST">
56
+
57
+ <label for="">ユーザー名</label>
58
+
59
+ <input type="text" name="user_name" placeholder="user name">
60
+
61
+ <label for="">パスワード</label>
62
+
63
+ <input type="password" name="password" placeholder="password">
64
+
65
+ <input type="submit" value="新規登録">
66
+
67
+ </form>
68
+
69
+ </body>
70
+
71
+ </html>
72
+
73
+ ```
74
+
75
+
76
+
77
+
78
+
29
79
  ```app
30
80
 
31
81
  .py
@@ -144,9 +194,13 @@
144
194
 
145
195
  return redirect('/login')
146
196
 
147
-
197
+ ```
198
+
148
-
199
+ ###試したこと
200
+
149
-
201
+ https://qiita.com/414_cherry/items/b34f6c6db087e2e35a51
202
+
203
+ を参考にして誤字があるかチェックしましたが、ダメでした。
150
204
 
151
205
  ### 補足情報(FW/ツールのバージョンなど)
152
206
 
@@ -174,7 +228,7 @@
174
228
 
175
229
  |-table.html
176
230
 
177
- |-Registar.html
231
+ |-signup.html
178
232
 
179
233
  |-login.html
180
234
 

1

補足説明

2021/12/28 12:05

投稿

jaogjig
jaogjig

スコア21

test CHANGED
File without changes
test CHANGED
@@ -149,3 +149,49 @@
149
149
 
150
150
 
151
151
  ### 補足情報(FW/ツールのバージョンなど)
152
+
153
+ ファイルとディレクトリの配置
154
+
155
+ _pycache_
156
+
157
+ |-app.cpython-39.pyc
158
+
159
+ images
160
+
161
+ |-2.png
162
+
163
+ static
164
+
165
+ |-design.css
166
+
167
+ templates
168
+
169
+ |-howto.html
170
+
171
+ |-index.html
172
+
173
+ |-searched.html
174
+
175
+ |-table.html
176
+
177
+ |-Registar.html
178
+
179
+ |-login.html
180
+
181
+
182
+
183
+ app.py
184
+
185
+ search.db
186
+
187
+ クレスコ財務データ(自動保存済み).csv
188
+
189
+
190
+
191
+
192
+
193
+ FW:flask
194
+
195
+ 言語:Python3.9.7
196
+
197
+ pandasダウンロード済み