[web2py:23919] Global persisten service in web2py core

2009-06-11 Thread YangHong
Hi, Mdipierro and all I have a application run as a daemon, which provides remote controll function via socket, I use web2py as web app frame work, and I want to define a Session/Request/Respose like global object in web2py, call it MyManager, then I can access it's method to controll my real app

[web2py:23921] Re: Global persisten service in web2py core

2009-06-11 Thread YangHong
On 6月11日, 下午10时58分, YangHong wrote: > Hi, Mdipierro and all > > I have a application run as a daemon, which provides remote controll > function via socket, I use web2py as web app frame work, and I want to > define a Session/Request/Respose like global object in web2py, call

[web2py:24319] Re: Views without controllers

2009-06-16 Thread YangHong
On 6月17日, 上午7时13分, mdipierro wrote: > I think there should be a controller even if empty but, if this is for > testing you can do > > def empty(): response.render(request.args(0),{}) That will show "None" in a empty html. It should be: def empty(): return response.render(request.args(0),{})

[web2py:25219] BUG: print in gluon/restricted.py

2009-06-28 Thread YangHong
Hi, there In the trunk head, There is a "print..." in gluon/restricted.py line 1, which commit in the last -r1085, which cause mod_wsgi module failed to run web2py. Remove the 'print' make web2py running happy. --~--~-~--~~~---~--~~ You received this message b

[web2py:20809] Cann't update db in cron script?

2009-04-29 Thread YangHong
Hi all I added a cron task like this: web2py$ cat applications/everule/cron/crontab */2 * * * * root *everulecron/ download_upstream The function: def download_upstream(): query = (db.upstreamse.status == 'pending') rows = db(query).select(db.upstreamse.ALL

[web2py:20859] Re: Cann't update db in cron script?

2009-04-29 Thread YangHong
On 4月29日, 下午9时10分, mdipierro wrote: > if you run from shell you must also call > > db.commit() > > actions in https are automatically wrapped in transactions and > committed automatically. > Thanks very much. It works now. > On Apr 29, 4:40 am, YangHong wrote: >

[web2py:21462] Re: cron function in controller problem

2009-05-08 Thread YangHong
Use this one? */1 * * * * *my_app/abc/get You can print some info from get, and then confirm that you can see it from console which startup you web2py.py. ps, db.commit () works for me. On 5月7日, 下午4时48分, mika wrote: > Hello! > > I'm new to web2py. I have a problem with