Hello... i was checking the example of web2py+pyjamas on alterego and
trying that code i get the following error:
Traceback (most recent call last):
File "/home/dixie/Proyectos/web2py/gluon/restricted.py", line 107,
in restricted
exec ccode in environment
File
"/home/dixie/Proyectos/web2py/applications/netapp/controllers/default.py",
line 34, in <module>
File "/home/dixie/Proyectos/web2py/gluon/globals.py", line 97, in <lambda>
self._caller = lambda f: f()
File
"/home/dixie/Proyectos/web2py/applications/netapp/controllers/default.py",
line 14, in call
return service()
File "/home/dixie/Proyectos/web2py/gluon/tools.py", line 2058, in __call__
return self.serve_jsonrpc()
File "/home/dixie/Proyectos/web2py/gluon/tools.py", line 1981, in
serve_jsonrpc
if not method in methods:
TypeError: unhashable type: 'list'
#########################################################################
## This is a samples controller
## - index is the default action of any application
## - user is required for authentication and authorization
## - download is for downloading files uploaded in the db (does streaming)
## - call exposes all registered services (none by default)
#########################################################################
def index():
redirect(URL(r=request,f='todoApp'))
def call():
return service()
@service.jsonrpc
def getTasks():
todos = db(db.todo.id>0).select()
return [(todo.task,todo.id) for todo in todos]
@service.jsonrpc
def addTask(taskFromJson):
db.todo.insert(task= taskFromJson)
return getTasks()
@service.jsonrpc
def deleteTask (idFromJson):
del db.todo[idFromJson]
return getTasks()
def todoApp():
return dict()
response._vars=response._caller(call)
Maybe I'm doing something wrong, but i just copied the example.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---