2
を認識していない私は、web2pyのアプリに新しいテーブルを追加しましたKeyError
次のトレースバック付き:新しいテーブルが
Traceback (most recent call last):
File "E:\Programming\Python\web2py\gluon\restricted.py", line 204, in restricted
exec ccode in environment
File "E:/Programming/Python/web2py/applications/vote_up/models/db.py", line 85, in <module>
db.Field('user', db.users),
File "E:\Programming\Python\web2py\gluon\dal.py", line 5119, in __getattr__
return self[key]
File "E:\Programming\Python\web2py\gluon\dal.py", line 5113, in __getitem__
return dict.__getitem__(self, str(key))
KeyError: 'users'
どうすればこの問題を解決できますか?
:D私の愚かさ。私はPythonメソッドとして 'define_table'を見ていませんでしたが、私はPHPの時代にMySQLクエリを見ていたように、いくつかの神秘的なWeb2Pyのコンストラクトです。再度、@Anthonyに感謝します。 – Sathvik