[web2py] migratin apps

2010-05-08 Thread Tomas Pelka
self._caller = lambda f: f() File "/home/tom/web2py/applications/NetSim/controllers/analyze.py", line 127, in index ifaces = db().select(db.interfaces.ALL) File "/home/tom/web2py/gluon/sql.py", line 1323, in __getattr__ return dict.__getitem__(self,key) KeyError: 'interfaces' But tabele "interfaces" is in bd. Thanks for comments Cheers Tom -- Tomas Pelka

Re: [web2py] migratin apps

2010-05-09 Thread Tomas Pelka
db.define_table('.', fake_migrate=True) Run your code once, this should create the needed app/databases/*.table files, then remove th fake_migrate lines and you should be all set. -- Thadeus On Sat, May 8, 2010 at 4:52 PM, Tomas Pelka wrote: Hi all, is there any advice how

[web2py] python web console

2010-06-06 Thread Tomas Pelka
Hi all, if I'm correct web2py had a web (java script) python console. I can't find it now, is it still included? Thanks -- Tomas Pelka

[web2py] ajax widget - asynchronously updated

2010-07-08 Thread Tomas Pelka
thing like check if queue (source of data) have anything to provide or simple use a timer and reload widget every e.g. 10 sec. Thanks for advices. Please let me know if anything was unclear/wrong described. -- Tomas Pelka

Re: [web2py] Re: ajax widget - asynchronously updated

2010-07-19 Thread Tomas Pelka
'mywidget'); } with function refreshWidget() { ajax('refresh_widget.load', [], 'mywidget'); } On 13 Lug, 16:46, Tomas Pelka wrote: Thank you very much Adi, but rpoblem is that refreshWidget is called only once. And after that page looks like in attached screensho

Re: [web2py] Re: ajax widget - asynchronously updated

2010-07-25 Thread Tomas Pelka
Nobody knows? Harvesting web almost week, with no results. Have no idea how to solve this feature. Thanks for advices. On 07/19/2010 09:59 PM, Tomas Pelka wrote: Yes this is nice, but I thing this is better approach: in controler: def getResults(): . . return something in view

[web2py] Re: ajax widget - asynchronously updated

2010-07-26 Thread Tomas Pelka
Hi, where could I find implementation of LOAD (like {{=LOAD('sniffer','getResults',ajax=True)}}) function? Thanks -- Tomas Pelka

[web2py] only one instance of object

2010-08-02 Thread Tomas Pelka
clean for web2py? Thank you -- Tomas Pelka

Re: [web2py] Re: only one instance of object

2010-08-02 Thread Tomas Pelka
Thank you very much Massimo. On 08/02/2010 12:32 PM, mdipierro wrote: Singleton are not the solution if you are in a multiprocess environment. gc and cache.ram have the same problem. You can use cache.disk or db. On Aug 2, 3:39 am, Tomas Pelka wrote: Hi all, I'm just wond

[web2py] call response.flash = "smoething" from view

2010-02-04 Thread Tomas Pelka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, it possible run response.flash = "smoething" from view? You know I need to display response.flash = "Analyzing ..." when I click on submit button and then response.flash = "Successful done" when everything is done. Thanks for advice. - -- T

Re: [web2py] Re: call response.flash = "smoething" from view

2010-02-05 Thread Tomas Pelka
to arrange your web pages and actions, etc. On Feb5, 4:56am, Tomas Pelka wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, it possible run response.flash = "smoething" from view? You know I need to display response.flash = "Analyzing ..." when I click on submit

Re: [web2py] Re: call response.flash = "smoething" from view

2010-02-06 Thread Tomas Pelka
mdipierro wrote: > > > Yea this is it :D thank you Massimo. > > On Feb 5, 8:34 am, Tomas Pelka wrote: >> I was thinking about it a lot and I hope that I could use flash right >> from my form, like >> >> >> >> >> >> But I ha

[web2py] SQLField + custom widget not working validator

2010-02-06 Thread Tomas Pelka
Hi, have a problem with validator in combination with custom widget. in model: def analyze_form_widget(field, value): return INPUT(_destination=field.name, _value=value, requires=field.requires) in controller: def form_factory(*a): return SQLFORM(SQLDB(None).define_table(*a)) def index()

[web2py] webform actions

2010-02-27 Thread Tomas Pelka
Hi all, have some troubles with web form which have more than one button. It is obvious that one button (action connected with button) correspond with one function. According manual this should work: controler - def index(): form = FORM('blah blah', INPUT(_type='submit', _value=

[web2py] options.py problem

2010-04-16 Thread Tomas Pelka
Hi all, python web2py -L options.py ends with: File "web2py.py", line 20, in gluon.widget.start(cron=True) File "/home/tom/workspace/pyNetSim/web2py/gluon/widget.py", line 750, in start if options.test: AttributeError: 'module' object has no attribute 'test' No -T option specified. O

Re: [web2py] Re: options.py problem

2010-04-17 Thread Tomas Pelka
e options file. I changed the source in trunk so that it does > not expect options.test > > Massimo > > On Apr 16, 5:14 pm, Tomas Pelka wrote: >> Hi all, >> >> python web2py -L options.py >> ends with: >> >> File "web2py.py", line 20, in

Re: [web2py] Re: options.py problem

2010-04-17 Thread Tomas Pelka
Tomas Pelka wrote: > Still: > Cannot import config file [options] > > Btw I need to start web2py from script using: > > gluon.widget.start(cron=True) > > Is there any way how to preset options? I get it, I have to run directly HttpServer(option here). Looking

[web2py] db issue when accessing db from more than one place

2010-09-06 Thread Tomas Pelka
NetSim/controllers/logs.py>,line6,inindex log("log controler","test message from log!") File"/home/tom/web2py/applications/myapp/modules/LOG.py",line18,inlog File"/home/tom/web2py/gluon/sql.py",line1329,in__getattr__ returndict.__getitem__(self,key) KeyError:'syslogs' When I run " db.syslogs.insert(datetime=datetime.datetime.now(), incident="test")" from model it works just fine. Many thanks for advices. -- Tomas Pelka

[web2py] result of LOAD do not accept global css/javascript

2010-10-10 Thread Tomas Pelka
{pass}} getResults from controller produces an field containing HTML with appropriate classes etc (javascript is included in web2py_ajax.html). It seems that the result of LOAD is not affected by javascript and css. Thanks for advices. -- Tomas Pelka

Re: [web2py] Re: result of LOAD do not accept global css/javascript

2010-10-10 Thread Tomas Pelka
10, 10:19 am, Tomas Pelka wrote: Hello, need to affect result of LOAD by javascript and css. Tying to implement something likehttp://www.mattkruse.com/javascript/mktree/documentation.html. In view: {{if len(res)==0 and q_size==0:}} {{=nothing}} {{else:}} {{=LOAD('sniffer',&

Re: [web2py] Re: gecko/webkit problem

2010-01-30 Thread Tomas Pelka
I do not know about the problem in question but I am very curious > about the app you are developing. > > On Jan 30, 4:40 pm, Tomas Pelka wrote: >> Hi everybody, >> >> have a weird problem with displaying my page in gecko. Seems that my >> response._vars are displayed

[web2py] Re: gecko/webkit problem

2010-02-01 Thread Tomas Pelka
Tomas Pelka wrote: > Hi everybody, > > have a weird problem with displaying my page in gecko. Seems that my > response._vars are displayed even if they shouldn't be. Same as I type > {{=BEAUTIFY(response._vars)}} into my view. > > Should be more obvious from attache

Re: [web2py] Re: gecko/webkit problem

2010-02-01 Thread Tomas Pelka
mdipierro wrote: > What do you mean? if response.flash='' it does not show. Dooh, of course. Thank you. > > On Feb 1, 1:55 pm, Tomas Pelka wrote: >> Tomas Pelka wrote: >>> Hi everybody, >>> have a weird problem with displaying my page in gecko. See