Hi All,
I have a model that works well with SQLite but it doesn't with GAE
db.define_table('person',
SQLField('name'),
SQLField('email'),
SQLField('phone'),
SQLField('foto','upload'),
SQLField('manager','reference person')
)
db.person.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'person.name')]
db.person.manager.requires=IS_IN_DB(db,'person.id','%(name)s')
db.person.email.requires=[IS_EMAIL(),IS_NOT_IN_DB(db,'person.email')]
db.person.phone.requires=IS_NOT_EMPTY()
under GAE I get
ERROR 2009-01-24 23:11:12,654 main.py] Traceback (most recent call last):
File "C:\dev\web2py\gluon\restricted.py", line 62, in restricted
exec ccode in environment
File "C:\dev\web2py\applications\personal/models/db.py", line 35, in
<module>
SQLField('manager','reference person')
File "C:\dev\web2py\gluon\contrib\gql.py", line 108, in define_table
t._create()
File "C:\dev\web2py\gluon\contrib\gql.py", line 171, in _create
ftype=self._db._translator[field.type[:9]](self._db[referenced]._tableobj)
File "C:\dev\web2py\gluon\sql.py", line 339, in __getattr__
def __getattr__(self, key): return self[key]
File "C:\dev\web2py\gluon\sql.py", line 337, in __getitem__
def __getitem__(self, key): return dict.__getitem__(self,str(key))
KeyError: '_tableobj'
any ideas ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---