[web2py:16166] Re: web2py has a profiler

2009-02-11 Thread Douglas Soares de Andrade
Em Quarta-feira 11 Fevereiro 2009, às 05:02:16, Wes James escreveu: > Massimo, > > I just downloaded trunk and tried starting as normal and get: > > WARNING:root:unable to import dbhash > default applications appear to be installed already > web2py Enterprise Web Framework > Created by Massimo Di P

[web2py:16167] Re: cron patch

2009-02-11 Thread Iceberg
Hi gentlemens, web2py 1.56 with Achipa's cron patch is great. I just do a: copy applications/admin/cron applications/myapp/cron and then modify the applications/myapp/cron/crontab, replace the "admin" by "myapp", then the long time puzzle "old sessions" ( see http://groups.google.com/group/web2

[web2py:16168] Re: cron patch

2009-02-11 Thread Markus Gritsch
On Wed, Feb 11, 2009 at 11:21 AM, Iceberg wrote: > > Hi gentlemens, > > web2py 1.56 with Achipa's cron patch is great. I just do a: > copy applications/admin/cron applications/myapp/cron > and then modify the applications/myapp/cron/crontab, replace the > "admin" by "myapp", then the long time p

[web2py:16169] Re: 1.56.1 on GAE error 'SQLQuery' object has no attribute 'left'

2009-02-11 Thread ANDROSoft
well, i'm look at this video maybe i should reconsider using GAE for bussines projects - in this i need over 4000 items per table with relations... anyway, thanks for help regards SW On Feb 10, 1:55 pm, Robin B wrote: > You cannot paginate on GAE (efficiently), offset/count is O(n) and > goog

[web2py:16170] Re: cron patch

2009-02-11 Thread achipa
> To do so, I suggest the welcome application should have its own cron/ > expire_sessions.py etc. Further more, every new applications generated > by admin should better have its own cron/expire_sessions.py too. One > thing might be tricky here: currently the cron/crontab hardcode the > app name,

[web2py:16171] Re: cron patch

2009-02-11 Thread Markus Gritsch
On Wed, Feb 11, 2009 at 1:36 PM, achipa wrote: > > As Markus pointed out, expire_sessions.py (which is just an example > for cron, albeit a useful one :) ) only deals with disk based > sessions. Not sure who's the original author, but patches for DB based > sessions are welcome, I don't have a DB

[web2py:16172] Puppy app

2009-02-11 Thread annet
To get an idea of T2 and T3 I am going through the Web Design Patterns and T2 Components PDF of October 21 2008. My problem is that the display_puppy function doesn't create an image preview, it creates a link labeled download. My model reads like: db=SQLDB('sqlite://storage.db') db.define_tab

[web2py:16173] Re: form pre-population fails if field is shown in 1.56.2

2009-02-11 Thread Maurice Ling
I will expect the behaviour to be this: 1. If the form field is pre-populated with data A AND visualized, the visualized field should be populated with the data A, then data A should be accepted with the rest of the form data. Unless data A is amended by the user, then the amended data is accepte

[web2py:16174] Re: web2py has a profiler

2009-02-11 Thread notabene
That's better. Thank You. By the way. Remember to install python-profiler. Niels On Feb 11, 10:55 am, Douglas Soares de Andrade wrote: > Em Quarta-feira 11 Fevereiro 2009, às 05:02:16, Wes James escreveu: > > > > > Massimo, > > > I just downloaded trunk and tried starting as normal and get: >

[web2py:16175] Re: web2py has a profiler

2009-02-11 Thread mdipierro
Sorry this patch will not do. there must be one locker or the apps are not serialized when profiling. I fixed it in trunk anyway (please check). Massimo On Feb 11, 3:55 am, Douglas Soares de Andrade wrote: > Em Quarta-feira 11 Fevereiro 2009, às 05:02:16, Wes James escreveu: > > > > > Massimo

[web2py:16177] jquery plugins

2009-02-11 Thread mdipierro
do not miss these: http://devsnippets.com/reviews/using-jquery-to-style-design-elements-20-impressive-plugins.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group,

[web2py:16176] Re: form pre-population fails if field is shown in 1.56.2

2009-02-11 Thread mdipierro
This is how it is now 1) db.define_table('person',db.Field('person'),db.Field ('gender',default='male')) form=SQLFORM(db.person) form.vars.gender='female' form.accepts() shows 'male' by default. and form.vars.gender gets ignored 2) db.define_table('person',db.Field('person'),db.Field ('ge

[web2py:16178] #!/usr/bin/python returns errors

2009-02-11 Thread Kacper Krupa
Hello, #!/usr/bin/python returns errors on my mac. I had to change it to #!/ usr/bin/env python. I think you shoud replace it. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To

[web2py:16179] Re: #!/usr/bin/python returns errors

2009-02-11 Thread Wes James
if you do which python at the command line what do you get? How it is now has always worked on my macs. Do you have something weird set in your .bashrc? Time for archive and install? On Wed, Feb 11, 2009 at 11:11 AM, Kacper Krupa wrote: > > Hello, > > #!/usr/bin/python returns errors on my

[web2py:16180] Re: #!/usr/bin/python returns errors

2009-02-11 Thread Timothy Farrell
#!/usr/bin/env python should be the normal setting for *nix environments. The idea is that running env sets the appropriate path for which to find the latest version of "python" If that line doesn't work, then you should fix the environment path, not the first line in your scripts. Wes Jame

[web2py:16182] Re: #!/usr/bin/python returns errors

2009-02-11 Thread Kacper Krupa
It's 'cos i have another python on /usr/lib/python. When i've added #!/ usr/bin/env python it choose python from PYTHONPATH. On 11 Lut, 19:45, Wes James wrote: > if you do > > which python > > at the command line what do you get? > > How it is now has always worked on my macs. > > Do you have so

[web2py:16181] Re: form pre-population fails if field is shown in 1.56.2

2009-02-11 Thread vihang
I agree with Denes that the "pre-populate" is kindof misleading. I was stuck with this for a while too. On the first go I would have expected the behavior as explained by Maurice, and preferred that. But backward compatibility is important. So the ball is in Massimo's court. On Feb 11, 9:15 pm, m

[web2py:16183] Re: #!/usr/bin/python returns errors

2009-02-11 Thread Kacper Krupa
I've created symbolic link. It works but using /usr/bin/env python is better i think. On 11 Lut, 19:51, Kacper Krupa wrote: > It's 'cos i have another python on /usr/lib/python. When i've added #!/ > usr/bin/env python it choose python from PYTHONPATH. > > On 11 Lut, 19:45, Wes James wrote: > >

[web2py:16184] Re: form pre-population fails if field is shown in 1.56.2

2009-02-11 Thread vihang
Also, Denes could instead of form.vars.field='value' do db.database.field.default='value' before the form=SQLFROM, to "pre-populate" using controller values and see it in the form filled On Feb 11, 10:49 pm, vihang wrote: > I agree with Denes that the "pre-populate" is kindof misleading.

[web2py:16186] Re: why can I not import ldap lib?

2009-02-11 Thread Tincho
ups, you are rigth, thanks for the answer, i'm just begging with web2py and it's increible easy to use. Congratulations massimo, you did a really good work... On 10 feb, 11:42, mdipierro wrote: > Are you using the binary distribution of web2py? In this case it is > using its own python and it do

[web2py:16187] Re: #!/usr/bin/python returns errors

2009-02-11 Thread mdipierro
Those lines were put there by PythonTidy so I assume we should not change them. What does pep8 say? On Feb 11, 12:55 pm, Kacper Krupa wrote: > I've created symbolic link. It works but using /usr/bin/env python is > better i think. > > On 11 Lut, 19:51, Kacper Krupa wrote: > > > It's 'cos i have

[web2py:16189] Re: why can I not import ldap lib?

2009-02-11 Thread mdipierro
lots of people have helped and are helping. welcome on board! it would be great if you could write an ldap howto on AlterEgo. Massimo On Feb 11, 1:32 pm, Tincho wrote: > ups, you are rigth, thanks for the answer, i'm just begging with > web2py and it's increible easy to use. > Congratulations

[web2py:16185] Re: jquery plugins

2009-02-11 Thread mr.freeze
Good stuff. That reminds me...I think a good addition to web2py would be some kind of page/script manager (like t2's response.files on steroids). Just thinking off the top of my head here but... response.stylesheets (list rendered in the head of we2py_ajax.html) response.pagescripts(list rendere

[web2py:16190] Re: #!/usr/bin/python returns errors

2009-02-11 Thread Timothy Farrell
http://letmegooglethatforyou.com/?q=pep+8 mdipierro wrote: > Those lines were put there by PythonTidy so I assume we should not > change them. What does pep8 say? > > On Feb 11, 12:55 pm, Kacper Krupa wrote: > >> I've created symbolic link. It works but using /usr/bin/env python is >> better

[web2py:16191] Re: #!/usr/bin/python returns errors

2009-02-11 Thread Timothy Farrell
I suppose I could be a little more helpful. PEP 8 says nothing WRT this. Wikipedia seems to suggest using '/usr/bin/env python' is a good idea. http://en.wikipedia.org/wiki/Shebang_(Unix) mdipierro wrote: > Those lines were put there by PythonTidy so I assume we should not > change them. Wha

[web2py:16188] Re: jquery plugins

2009-02-11 Thread mdipierro
Can you write the addscript function? On Feb 11, 1:31 pm, "mr.freeze" wrote: > Good stuff.  That reminds me...I think a good addition to web2py would > be some kind of page/script manager (like t2's response.files on > steroids). Just thinking off the top of my head here but... > > response.styl

[web2py:16192] Re: #!/usr/bin/python returns errors

2009-02-11 Thread Wes James
On Wed, Feb 11, 2009 at 12:49 PM, Timothy Farrell wrote: > > http://letmegooglethatforyou.com/?q=pep+8 Interesting. It reminds me of the web sites out there these days that look like a legitimate spyware scanner, but if you simply go to these pages your system gets malware/trojans installed (w

[web2py:16193] Re: web2py has a profiler

2009-02-11 Thread Fran
On Feb 11, 4:30 pm, mdipierro wrote: > I fixed it in trunk anyway (please check). My Windows service still fails: Traceback (most recent call last): File "C:\Bin\web2py\gluon\winservice.py", line 40, in SvcDoRun self.start() File "C:\Bin\web2py\gluon\winservice.py", line 105, in start

[web2py:16194] Re: web2py has a profiler

2009-02-11 Thread mdipierro
Add this line: profiler_filename = None to your options_std.py file. Massimo On Feb 11, 2:12 pm, Fran wrote: > On Feb 11, 4:30 pm, mdipierro wrote: > > > I fixed it in trunk anyway (please check). > > My Windows service still fails: > > Traceback (most recent call last): >   File "C:\Bin\web

[web2py:16195] Re: web2py has a profiler

2009-02-11 Thread Fran
On Feb 11, 4:28 pm, notabene wrote: > By the way. Remember to install python-profiler. Right - this bit my server too. Needs documenting at least :/ Can this be made to fail gracefully if not present? - not really backwards-compatible otherwise... F --~--~-~--~~~---~

[web2py:16196] Re: Deploy web2py on multiple server..and admin it :)

2009-02-11 Thread mdipierro
Sorry I did not respond this one. I missed it. The best way is to used a shared file system. This is partially discussed in the free chapters of the manual you can download from the documentation web site. Massimo On Feb 7, 3:30 pm, cromagn wrote: > newbie on web2py, so sorry... > i need to d

[web2py:16197] Re: web2py has a profiler

2009-02-11 Thread Fran
On Feb 11, 9:35 pm, mdipierro wrote: > Add this line: > profiler_filename = None > to your options_std.py file. options.py works, thanks - back in business :) F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2

[web2py:16198] Re: web2py has a profiler

2009-02-11 Thread mdipierro
OK. I made a change in trunk that will work without cProfile if no -F option is specified. On Feb 11, 3:43 pm, Fran wrote: > On Feb 11, 4:28 pm, notabene wrote: > > > By the way. Remember to install python-profiler. > > Right - this bit my server too. > Needs documenting at least :/ > Can this

[web2py:16199] Re: jquery plugins

2009-02-11 Thread mr.freeze
Sure. I think it would look something like this (in gluon/ clienttools.py): class PageManager(object): def __init__(self, response): if not response.scripts: response.scripts = [] def addscript(self,script): response.scripts.append(script) Then in web2py_ajax.html as the

[web2py:16200] t3 itemize and firefox

2009-02-11 Thread Wes James
Anyone else see the itemize list appearing in the middle of the browser with t3 on firefox? -wj --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2

[web2py:16201] Re: form pre-population fails if field is shown in 1.56.2

2009-02-11 Thread Maurice Ling
In view to maintain backward compatibility, can I propose that 2 behaviours: Behaviour #1: form.vars.field=value be only effective for non- visualized fields (current behaviour) - if the field is visualized, then this has no effect, that is, the form takes precedence. This will only require a cha

[web2py:16202] Re: error when import

2009-02-11 Thread INeedHelp
where to change the sql.py?? thanks On Feb 11, 4:35 am, Kacper Krupa wrote: > AFAIK you can replace double exception to: > except (ValueError,TypeError): >     ... > > On 10 Lut, 15:29, mdipierro wrote: > > > > > Try replace in sql.py > > > def is_integer(x): > >     try: > >         long(x) >

[web2py:16203] Re: form pre-population fails if field is shown in 1.56.2

2009-02-11 Thread mdipierro
I really do not like to touch this stuff because historically, every time I changed form processing, something broke. Anyway, I think I have implemented what you suggest and it is available in trunk. Please test it careful for a few forms (with string, textarea and checkboxes, default and no def

[web2py:16204] Re: error when import

2009-02-11 Thread mdipierro
search for "is_integer" in gluon/sql.py or get the latest trunk. Massimo On Feb 11, 10:06 pm, INeedHelp wrote: > where to change the sql.py?? >  thanks > > On Feb 11, 4:35 am, Kacper Krupa wrote: > > > AFAIK you can replace double exception to: > > except (ValueError,TypeError): > >     ... >

[web2py:16205] Re: GAE: sql bug

2009-02-11 Thread mdipierro
I think this is now fixed in trunk. Robin give it a try when you can. I am not sure if you are expecting something from me. Please remind me if you do. Massimo On Feb 9, 6:05 pm, Robin B wrote: > I think you are misunderstanding the error message. > > BadValueError: Property size must be a flo

[web2py:16206] CSV IO

2009-02-11 Thread mdipierro
I believe all outstanding issues with CSV export/import have been resolved BUT make sure you have the latest appadmin.py in your applications. Part of the bug was in the old appadmin.py. Massimo --~--~-~--~~~---~--~~ You received this message because you are subscr

[web2py:16207] Re: jquery plugins

2009-02-11 Thread mr.freeze
All together now... (gluon/clientutils.py)... class PageManager(object): def __init__(self, response): self.response = response self.response.scripts=[] self.response.pagescripts=[] self.response.stylesheets=[] def addscript(self,script): if not scr

[web2py:16208] Re: jquery plugins

2009-02-11 Thread mdipierro
Try something like this: class JQuery: def __init__(self,name,attr=None,*args): self.name=name self.attr=attr self.args=args def __str__(self): if not self.attr: return "$('%s')" % self.name import gluon.contrib.simplejson as json args=',

[web2py:16209] Re: jquery plugins

2009-02-11 Thread mdipierro
Better and more powerful: class JQuery: def __init__(self,name,attr=None,*args): self.name=name self.attr=attr self.args=args def __str__(self): import gluon.contrib.simplejson as json def encode(obj): if isinstance(obj,JQuery): return s

[web2py:16210] Re: jquery plugins

2009-02-11 Thread mdipierro
from gluon.html import * class JQuery: def __init__(self,name,attr=None,*args): self.name=name self.attr=attr self.args=args def __str__(self): import gluon.contrib.simplejson as json def encode(obj): if isinstance(obj,JQuery): return st