I have a wiki app which has problems when I try and run it in GAE SDK.
Essentially it is a modifies version of the standard example wiki app
from the web2py book.
The GAE SDK throws an error when I try index view with the following
model, controller, and error output from GAE
model:
db.define_table('page',
SQLField('uuid',length=128,writable=False,default=str(uuid.uuid4
())),
SQLField('timestamp','double',default=now),
SQLField('title'),
SQLField('body','text'))
controller:
def index():
""" this controller returns a dictionary rendered by the view
to list all wiki page
>>> index().has_key('pages')
True
"""
mypages=db().select
(db.page.id,db.page.uuid,db.page.title,orderby=db.page.title)
return dict(pages=mypages)
command line output from GAE:
INFO 2009-03-29 09:21:32,280 dev_appserver.py] "GET /fabmonger/
default/index
HTTP/1.1" 200 -
WARNING 2009-03-29 09:21:33,546 cache.py] no cache.disk
INFO 2009-03-29 09:21:33,858 dev_appserver.py] "GET /fabmonger/
default/login
HTTP/1.1" 200 -
WARNING 2009-03-29 09:21:37,953 cache.py] no cache.disk
ERROR 2009-03-29 09:21:38,062 main.py] Traceback (most recent call
last):
File "c:\apps\web2py\gluon\restricted.py", line 98, in restricted
exec ccode in environment
File "c:\apps\web2py\applications\fabmonger/controllers/default.py",
line 205,
in <module>
File "c:\apps\web2py\gluon\globals.py", line 75, in <lambda>
self._caller = lambda f: f()
File "c:\apps\web2py\applications\fabmonger/controllers/default.py",
line 40,
in index
mypages=db().select
(db.page.id,db.page.uuid,db.page.title,orderby=db.page.ti
tle)
File "c:\apps\web2py\gluon\contrib\gql.py", line 717, in select
(items, tablename, fields) = self._select(*fields, **attributes)
File "c:\apps\web2py\gluon\contrib\gql.py", line 662, in _select
table = self._get_table_or_raise()
File "c:\apps\web2py\gluon\contrib\gql.py", line 641, in
_get_table_or_raise
raise SyntaxError, 'SQLSet: no tables selected'
SyntaxError: SQLSet: no tables selected
INFO 2009-03-29 09:21:38,108 dev_appserver.py] "GET /fabmonger/
default/index
HTTP/1.1" 200 -
Any help appreciated.
Chrism
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---