我正在尝试使用安东尼发布的方法
db.define_table('ts_customer',
Field('customer_name', 'string', length=80, required=True, unique=True))
db.define_table('ts_mileage_rate',
Field('customer_id', 'reference ts_customer', required=True, notnull=True),
Field('mileage_rate_year', 'integer', required=True, notnull=True,
requires=IS_NOT_IN_DB(
db(db.ts_mileage_rate.customer_id == request.vars.customer_id),
'ts_mileage_rate.mileage_rate_year')
))
我收到以下错误:
键入“exceptions.AttributeError”>“DAL”对象没有属性“ts_mileage_rate”
知道为什么吗?