Re: [web2py] Re: New importer in trunk

2011-05-18 Thread Martín Mulone
Use it like a helper. in a module I have: (this fail because LOAD is not passed in current and loadfactory need enviroment) def renderimages(self, page=1, postid=0):curvars = {} curvars['page']=pagecurvars['postid']=postid return LOAD('plug

[web2py] Re: New importer in trunk

2011-05-17 Thread pierreth
On 17 mai, 14:36, Martín Mulone wrote: > Pierreth I'm testing this, and it all seem to work very well, nice feature > indeed!. :-) >I'm looking for memory leak but it's seem stable in my notebook. I > already rewrite powerpack, to support this, at first sigth it's double the > speed from the old

[web2py] Re: New importer in trunk

2011-05-17 Thread Massimo Di Pierro
What do you want to do exactly with LOAD in modules? On May 17, 1:36 pm, Martín Mulone wrote: > Pierreth I'm testing this, and it all seem to work very well, nice feature > indeed!. I'm looking for memory leak but it's seem stable in my notebook. I > already rewrite powerpack, to support this, at

Re: [web2py] Re: New importer in trunk

2011-05-17 Thread Martín Mulone
Pierreth I'm testing this, and it all seem to work very well, nice feature indeed!. I'm looking for memory leak but it's seem stable in my notebook. I already rewrite powerpack, to support this, at first sigth it's double the speed from the old way putting all in models (I have many models). So I'm

[web2py] Re: New importer in trunk

2011-05-17 Thread pierreth
It would be nice to have feedback to know if the new feature is working well for you. Tell me if everything is OK or not.

[web2py] Re: New importer in trunk

2011-05-16 Thread villas
Yes, I think that would be a good idea. Maybe there is already a similar way to do that? On May 17, 12:38 am, pierreth wrote: > Would it be better as a command line argument for webp2y.py? > Something like: > python web2py.py --debug > ?

[web2py] Re: New importer in trunk

2011-05-16 Thread pierreth
Would it be better as a command line argument for webp2y.py? Something like: python web2py.py --debug ?

[web2py] Re: New importer in trunk

2011-05-16 Thread villas
Tip: get the value of the URL and set the Debug accordingly from that, it makes it easier if you don't have to remember changing the flag. Have a look at this, for example: request.env.http_host.split('.')[0] On May 16, 6:15 pm, Ross Peoples wrote: > I was thinking about setting this in a db.p

[web2py] Re: New importer in trunk

2011-05-16 Thread Ross Peoples
I was thinking about setting this in a db.py file or something to indicate that the app in in debug mode. Then before deploying, setting this to false. Also allowing controllers, modules, etc to access the value of this might be beneficial. It could be a master 'debug' switch for an entire appli

[web2py] Re: New importer in trunk

2011-05-16 Thread pierreth
On 16 mai, 11:08, Ross Peoples wrote: > I haven't actually tried this yet, but couldn't you do something like this > to turn it off/on: > > import gluon custom_import > custom_import.DEBUG = False You can do: from gluon import custom_import custom_import.DEBUG = False But right now it won't cha

[web2py] Re: New importer in trunk

2011-05-16 Thread Ross Peoples
I haven't actually tried this yet, but couldn't you do something like this to turn it off/on: import gluon custom_import custom_import.DEBUG = False