我试图让list:reference字段类型适用于 web2py,但由于某种原因,我收到了一个错误。我正在尝试http://web2py.com/book/default/chapter/06上的示例:
db.define_table('tag',Field('name'),format='%(name)s')
db.define_table('product',
Field('name'),
Field('tags','list:reference tag'))
当我尝试这个时,我收到以下错误:
Traceback (most recent call last):
File "gluon/restricted.py", line 178, in restricted
File "C:/web2py/applications/idd/models/db.py", line 93, in <module>
File "gluon/sql.py", line 1309, in define_table
File "gluon/sql.py", line 1664, in _create
SyntaxError: Field: unknown field type: list:reference tag for tags
这应该很简单,但不起作用。我错过了书中没有告诉我们的东西吗?