[web2py] Re: FORM with CHEKCBOX and IS_IN_DB

2010-07-27 Thread mdipierro
Try this: def test2(): posts=db(db.papers.id > 0).select() def writable(id): condition = not posts.find(lambda r: r.id==id).printout chkposts=[Field('pst_ %s'%pst.id,requires=condition,label=pst.printdate, writable=condition) for pst in posts] form=SQLFORM.factory(*chkpost

[web2py] Re: Custom Registration form

2010-07-27 Thread mdipierro
You are mixing a SQLFORM (the form in the first two lines) with a FORM (in the register function). If you want db access you need to insert the former not the latter. If you want a custom form you should not use FORM at all, you should just place the {{=form.cutsom.widget}}s in the view. On Jul 26

[web2py] Re: Error after a page is deleted in plugin_wiki

2010-07-27 Thread mdipierro
This needs some thought. Pages should disabled not deleted. Good catch. On Jul 26, 5:33 pm, Bruno Rocha wrote: > I found an error in the model plugin_wiki. > 1. Create a new page > 2. make some changes to include entries in the table > plugin_wiki_page_archive > 3. Appadmin go through the table .

[web2py] Re: table migration metadata storage location

2010-07-27 Thread mdipierro
It is true, they are not read but I cannot be sure this will remain the case in the future (although probably yes). I do not have a strong opinion. On Jul 26, 7:56 pm, Thadeus Burgess wrote: > When migrate = False and fake_migrate = False the .table files are not > even read from the filesystem,

[web2py] Hide Error on SQLFORM

2010-07-27 Thread Thadeus Burgess
I don't get it SQLFORM.factory(Field., hideerror=True). It doesn't do what its supposed to. How can I make sure that none of my widgets render errors alongside their own INPUT elements without rewriting everything in sqlhtml? -- Thadeus

[web2py] How do I secure an RSS feed in my app

2010-07-27 Thread Adi
I wish to make a "secure" RSS (like Gmail RSS feed) - the user must login before the feed becomes available. How can I implement this in web2py? I tried the auth.requires_login decorator but it relies on redirection. That's not what I want. Please check out Twitter timeline RSS feed, or Gmail RSS

[web2py] Re: FORM with CHEKCBOX and IS_IN_DB

2010-07-27 Thread KMax
Thank you for promt responce, Sorry for my dumpness, and possible quite barbarism, but how it should work? requires=condition and writable=condition give error NameError: global name 'condition' is not defined Where is writable(id) called? and what for it? condition = not posts.find(lambda r: r.id=

[web2py] Re: How do I secure an RSS feed in my app

2010-07-27 Thread Adi
I'll add some more useful information: Right now what I have is: - In default.py a method "feed()" - A file feed.rss in views/default This allows me to call app/default/feed.rss which is like a public url However, if I follow the book and add @auth.requires_login to call() and then do app/defau

[web2py] Strange radio button behavior

2010-07-27 Thread Alastair Medford
I was wanting to have horizontal radio buttons in my forms, so I set about making my own widget. The widget works well, except for one odd behavior. When I load the form, the first radio button is selected as desired. But after the form submits, page refreshes etc, the last radio buttons in the lis

[web2py] Cool online Editor

2010-07-27 Thread Timmie
Hello, have you seen: http://etherpad.org/index.html or demo at: http://doc.etherpad.org/tUrCqk8ZMo It would be great to have this functionality in plugin_wiki! What do yoiu think? Best regards, Timmie

[web2py] Re: book revision

2010-07-27 Thread Timmie
Hello, what date do you target as publishing date? Best regards, Timmie

Re: [web2py] Strange radio button behavior

2010-07-27 Thread Mathieu Clabaut
Hi Massimo, A colleague of mine tell me he sent you a patch to include a horizontal radio buttons in gluon (similar to the existing horizontal checkboxes). Has the patch a chance to make its way to the trunk ? Best regards, -Mathieu On Tue, Jul 27, 2010 at 10:15, Alastair Medford wrote: > I

[web2py] Re: book revision

2010-07-27 Thread Timmie
Hello, have you tried Pandoc: http://johnmacfarlane.net/pandoc/ http://johnmacfarlane.net/pandoc/try If you consider your markup langauge stable, why not submitting it to the developer of Pandoc? Regards, Timmie

[web2py] Privacy with plugin_wiki

2010-07-27 Thread Timmie
Hello, I have seen that you use Google Chartin API. Does this mean that my data is sent to Google for preparing the charts? If so, I would recommend searching for a standalone charting lib like matplotlib. regards. Timmie

[web2py] CLI for Application

2010-07-27 Thread James McMillan
I have written a simple application involving a single model and a single controller. I would also like to provide a CLI version for it. Is it possible to run the application and be able to interact (through print / input() or similar) with the controller? It would need to load the model, then exec

[web2py] SQLFORM update not working?

2010-07-27 Thread Florian
Hi, I'm trying web2py and want to create a "product" database and forms. -displaying all products -displaying one (in detail) and -creating a new product works, but i have problems with the "edit/delete" part. It will show the filled-out form when calling e.g. product/edit/2 , but submitting the

[web2py] Re: FORM with CHEKCBOX and IS_IN_DB

2010-07-27 Thread KMax
I just solve this by using db.define_table('papers', Field('printdate','date'), Field('printout','boolean',default=False), Field('oncheck','string',default='on')) # this field for checkbox value = 'on' def test1(): chkposts=[] posts=db(db.papers.id > 0).select() for pst in

Re: [web2py] Re: book revision

2010-07-27 Thread Thadeus Burgess
And SQLFORM(onvalidate) -- Thadeus On Tue, Jul 27, 2010 at 12:52 AM, Thadeus Burgess wrote: > IS_IN_SET zero changes and how they work and why it is that way now. > > -- > Thadeus > > > > > > On Mon, Jul 26, 2010 at 11:20 PM, Iceberg wrote: >> On Jul 24, 5:53am, mdipierro wrote: >>> I am re

[web2py] google decided to block all posts today

2010-07-27 Thread mdipierro
... sorry if you are having trouble.

[web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread mdipierro
I am surprised it does not. can you help debug. Try form.errors.clear() On Jul 27, 2:29 am, Thadeus Burgess wrote: > I don't get it > > SQLFORM.factory(Field., hideerror=True). > > It doesn't do what its supposed to. > > How can I make sure that none of my widgets render errors alongside

[web2py] Re: Strange radio button behavior

2010-07-27 Thread mdipierro
I thought it was included unless I got confused with a different patch. Please ask him to resend. On Jul 27, 3:21 am, Mathieu Clabaut wrote: > Hi Massimo, > >  A colleague of mine tell me he sent you a patch to include a horizontal > radio buttons in gluon (similar to the existing horizontal chec

[web2py] Re: Privacy with plugin_wiki

2010-07-27 Thread mdipierro
I will move to jflot On Jul 27, 3:33 am, Timmie wrote: > Hello, > I have seen that you use Google Chartin API. > > Does this mean that my data is sent to Google for preparing the > charts? > > If so, I would recommend searching for a standalone charting lib like > matplotlib. > > regards. > Timmi

[web2py] Re: SQLFORM update not working?

2010-07-27 Thread mdipierro
This: def edit(): form = SQLFORM(db.product, request.args(0)) return dict(form=form) should be def edit(): form = SQLFORM(db.product, request.args(0)) if form.accepts(request.vars,session): pass return dict(form=form) or def edit(): form = crud.update(db.product, reques

[web2py] Re: book revision

2010-07-27 Thread mdipierro
Can you help? I am swamped On Jul 27, 3:22 am, Timmie wrote: > Hello, > have you tried Pandoc:http://johnmacfarlane.net/pandoc/ > > http://johnmacfarlane.net/pandoc/try > > If you consider your markup langauge stable, why not submitting it to > the developer of Pandoc? > > Regards, > Timmie

[web2py] Re: book revision

2010-07-27 Thread mdipierro
End of August final. On Jul 27, 3:18 am, Timmie wrote: > Hello, > what date do you target as publishing date? > > Best regards, > Timmie

[web2py] group memberships on the fly : to auth or not to auth?

2010-07-27 Thread aure
Hi everyone, I am trying to create an app in which a user can create a group and invite people to join it. A member of a group can then add documents to the group. This is not possible for non members of a group. My question is: is the authorisation mechanism described in the book (with decorat

Re: [web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread Thadeus Burgess
There is no possible way it can. Looking through the source code, it never passes along the extra attributes to anything. The current way the widgets are implemented never use attributes passed to them. -- Thadeus On Tue, Jul 27, 2010 at 4:13 AM, mdipierro wrote: > I am surprised it does not

[web2py] Re: SQLite Logging

2010-07-27 Thread Yarin
+1 Think this is the right way to go. I'm working on the module now, should have something to show within next couple days.. On Jul 24, 12:04 pm, Iceberg wrote: > That way the developer need to implement a dedicate action, perhaps > protected by authentication, to access log on WEB. It is reason

[web2py] Re: Strange radio button behavior

2010-07-27 Thread _po
Hi Massimo, I sent you this last week : I hope the patch is still up to date... With this patch, radio widget can use 'cols' attribute ; As previously done for checkboxes. Grettings, PO. diff -r dcd13ab59569 gluon/sqlhtml.py --- a/gluon/sqlhtml.py Tue Jul 20 02:43:46 2010 -0500 +++ b/gluon/sql

[web2py] Re: multiple checkboxes

2010-07-27 Thread KMax
> But after > reading:http://groups.google.com/group/web2py/browse_thread/thread/401b4c1928..., > I don't think sqlform.factory is able to do what I want it to do.  I > want to basically display ALL rows of a table given this database so Actualy FORM(and sqlform.factory i guess) could do any form

[web2py] Re: group memberships on the fly : to auth or not to auth?

2010-07-27 Thread mdipierro
It is appropriate for what you need to do. On Jul 27, 4:40 am, aure wrote: > Hi everyone, > > I am trying to create an app in which a user can create a group and > invite people to join it. > > A member of a group can then add documents to the group. This is not > possible for non members of a gr

[web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread mdipierro
It is the INPUT widget that upon serialization displays the errors. I can see it may be a problem with custom widgets. On Jul 27, 4:42 am, Thadeus Burgess wrote: > There is no possible way it can. Looking through the source code, it > never passes along the extra attributes to anything. The curre

[web2py] Re: Strange radio button behavior

2010-07-27 Thread mdipierro
email please, indentation is messed up. Thanks. On Jul 27, 4:37 am, _po wrote: > Hi Massimo, > I sent you this last week : > I hope the patch is still up to date... > > With this patch, radio widget can use 'cols' attribute ; As previously > done for > checkboxes. > > Grettings, > PO. > > diff -r

[web2py] Re: group memberships on the fly : to auth or not to auth?

2010-07-27 Thread aure
Thanks, Massimo! On 27 juil, 12:02, mdipierro wrote: > It is appropriate for what you need to do. > > On Jul 27, 4:40 am, aure wrote: > > > Hi everyone, > > > I am trying to create an app in which a user can create a group and > > invite people to join it. > > > A member of a group can then add

[web2py] sending membership invitations

2010-07-27 Thread aure
Hi everyone, In an app a user have to send invitations to friends for them to register on the app, and possibly join a group the sender has created beforehand. 1. Does someone know about a way to have the app connect to GMail/ Facebook/... bring a list of people to select from, and send an email

Re: [web2py] Re: Privacy with plugin_wiki

2010-07-27 Thread Stef Mientki
what about protovis ? http://vis.stanford.edu/protovis/ex/ cheers, Stef On 27-07-2010 11:16, mdipierro wrote: > I will move to jflot > > On Jul 27, 3:33 am, Timmie wrote: >> Hello, >> I have seen that you use Google Chartin API. >> >> Does this mean that my data is sent to Google for preparin

[web2py] Re: Privacy with plugin_wiki

2010-07-27 Thread mdipierro
cool. I did not know. May be too heavy for the purpose but I will look. Massimo On Jul 27, 5:26 am, Stef Mientki wrote: > what about protovis ?http://vis.stanford.edu/protovis/ex/ > > cheers, > Stef > > On 27-07-2010 11:16, mdipierro wrote: > > > I will move to jflot > > > On Jul 27, 3:33 am, Ti

[web2py] book 3rd edition call of help

2010-07-27 Thread mdipierro
This is very very preliminary: http://web2py.com/book2 It is not editable (yet) and I am still adding material but it does address a lot of issues. Please use this thread to add comments in particular: What sections are missing? What needs to be clarified? Are there spelling errors? Are there

Re: [web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread Thadeus Burgess
This has been a problem for quite some time, I just did not get around to complaining about it again until now =) If I am to use a custom form (which I almost always do). Then I can't have my form elements going off and rendering their own errors now can I? Not very enterprisey of SQLFORM to just

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread Adi
Wow..good job. Will take a while to review. :) On Jul 27, 3:49 pm, mdipierro wrote: > This is very very preliminary: > >    http://web2py.com/book2 > > It is not editable (yet) and I am still adding material but it does > address a lot of issues. > Please use this thread to add comments in partic

[web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread mdipierro
Let me look into this. I am sure there is a way to do it. I just never use custom forms myself. Is the problem with your own widgets? Do you assign widgets explicitely? Can you post an example? Massimo On Jul 27, 6:00 am, Thadeus Burgess wrote: > This has been a problem for quite some time, I ju

[web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread mdipierro
Until this is resolved this is how I usually handle the situation. form=SQLFORM() if form.accepts() errors,form.errors=form.errors,{} return dict(form=form,errors=form) Unless you do this the philosophy is that widgets handle their own errors and they can be customized by overridi

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread mdipierro
web2py.com/book was broken into section web2py.com/book2 is broken into chapters what is better? Once printed it will be the same. On Jul 27, 5:49 am, mdipierro wrote: > This is very very preliminary: > >    http://web2py.com/book2 > > It is not editable (yet) and I am still adding material but

[web2py] Re: Custom Registration form

2010-07-27 Thread elfuego1
OK!. Thank you for clarifying THAT. On 27 Lip, 09:09, mdipierro wrote: > You are mixing a SQLFORM (the form in the first two lines) with a FORM > (in the register function). If you want db access you need to insert > the former not the latter. If you want a custom form you should not > use FORM

[web2py] SQLFORM update not working?

2010-07-27 Thread Florian
Hi, I'm trying web2py and want to create a "product" database and forms. -displaying all products -displaying one (in detail) and -creating a new product works, but i have problems with the "edit/delete" part. It will show the filled-out form when calling e.g. product/edit/2 , but submitting the

[web2py] Re: SQLFORM update not working?

2010-07-27 Thread Florian
sry for reposting, it somehow didn't show up...

[web2py] Re: SQLFORM update not working?

2010-07-27 Thread Florian
okay, now this works :-) Thanks! Is inside "form.accepts" the code thats "acts" on the form data, and that was the reason why it didn't work? Another problem: How can I add a "db requirement" so that you can enter a value for product.ean only if you want to, but when there is one, it has to be un

[web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread mdipierro
I looked into it. What you are trying to do was never supported. hideerror was a machanism for allowing certain custom widgets to explicitly hide error or decide where to display them. I say "was" because I just implemented it the way *I think* you expect it to work. Works with custom forms as wel

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
Not sure if this is related to Rocket or whether a new topic is needed. This morning I found several OSError reports about "Too many open files" in a web2py development server that's been running locally for several days. The app code isn't doing any explicit file i/o so I don't know what's going

[web2py] Re: rocket performance issues

2010-07-27 Thread mdipierro
Are you opening any files explicitely in your app? Which web2py version and which Python version are you using? On Jul 27, 7:33 am, Michael Ellis wrote: > Not sure if this is related to Rocket or whether a new topic is needed. > > This morning I found several OSError reports about "Too many open

[web2py] Re: rocket performance issues

2010-07-27 Thread mdipierro
Ignore my previous email I see you are using 2.6 and the problem is with cron. I think the problem is a cron process that does not end and keeps restarting. Are you using cron? On Jul 27, 7:33 am, Michael Ellis wrote: > Not sure if this is related to Rocket or whether a new topic is needed. >

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
Not using cron. On Tue, Jul 27, 2010 at 8:43 AM, mdipierro wrote: > Ignore my previous email I see you are using 2.6 and the problem > is with cron. I think the problem is a cron process that does not end > and keeps restarting. Are you using cron? > > On Jul 27, 7:33 am, Michael Ellis w

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
I think I can test the cron hypothesis. I'm running web2py under winpdb. Normally, I set the fork mode to "parent, auto" so that it doesn't break when a child process starts. If I change it to manual, it should break next time a child process is spawned. What should I look for when that happens?

[web2py] Re: rocket performance issues

2010-07-27 Thread mdipierro
Yet is being called. It is on by default. Try set cron=False at the bottom of web2py.py On Jul 27, 7:49 am, Michael Ellis wrote: > Not using cron. > > On Tue, Jul 27, 2010 at 8:43 AM, mdipierro wrote: > > Ignore my previous email I see you are using 2.6 and the problem > > is with cron. I th

[web2py] Re: OpenID supported with login method

2010-07-27 Thread mdipierro
Sorry for my late replay. Can you explain what extended_login_form does? On Jul 25, 12:52 am, keitheis wrote: > Hi, > > I made theOpenIDsupport for sahana eden. And thanks to Fran Boon, I > did it most on web2py/gluon/contrib/login_methods . Here is the code: > > https://code.launchpad.net/~keit

[web2py] Re: global name 'MySQLdb' is not define d

2010-07-27 Thread mdipierro
This is very odd. Can any mod_wsgi expert explain this? On Jul 25, 3:36 am, oktay wrote: > I solved the problem. > It is strange but in sql.py before > "self._pool_connection(lambda :MySQLdb.Connection" I add import > MySQLdb. > I print some logs from sql.py and the first import in sql.py is not

[web2py] Re: Privacy with plugin_wiki

2010-07-27 Thread Anthony
Doesn't seem to work in IE yet (at least not the version they're running on the Protovis site). http://code.google.com/p/protovis-js/issues/detail?id=15&can=1 On Jul 27, 6:26 am, Stef Mientki wrote: > what about protovis ?http://vis.stanford.edu/protovis/ex/ > > cheers, > Stef > > On 27-07-2010

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread Frank
I think followings are missing after quick screening, hope it help, a. in access control section, missing description of reset_passward and setting; b. in service section,missing how reportlab for web2py deal with web2py pictures,tables and forms and how deal with the reportlab path difference bet

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
ok, I'll give that a shot in a few minutes if I don't get a fork break by then. BTW, I verified that cron/crontab is empty in my app. However it's not empty in admin and examples: $ cat admin/cron/crontab 10 * * * * root **applications/admin/cron/expire_sessions.py $ cat examples/cron/crontab

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread Anthony
Overall, I think I prefer the old approach of dividing into sections. The new approach involves a lot of scrolling/hunting if you're looking for something specific or trying to find a search term in a page returned by a search. On the other hand, in some cases, if you happen to be reading a whole c

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread Anthony
Regardless of which approach is taken, I think it's important to have a more detailed TOC _somewhere_ (i.e., ability to see a list of sections within chapters without having to go to the chapter page and scroll the whole page). On Jul 27, 9:51 am, Anthony wrote: > Overall, I think I prefer the ol

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread mdipierro
I agree but that is not the issue now. The issue is content. I am rewriting the book app using markmin and it allows tagging inside pages. The current content is already tagged (as you can see from the floating blobs on the right side of the window). These tags will be used to create a detailed ind

[web2py] Re: Mail function not working

2010-07-27 Thread Andrew Buchan
Thanks, but I tried that, along with a number of other port settings, using smtp as prefix etc... Has anyone els managed to get this working from a windows server? On Jul 22, 12:11 pm, Vasile Ermicioi wrote: > > mail.settings.server= '192.168.200.43:25' > >  add port

[web2py] Re: Mail function not working

2010-07-27 Thread mdipierro
Is 192.168.200.43:25 the windows box itself or an external unix box? In the first case, do you have an email server running on windows? On unix this works because you have postfix but windows does not come with one. You may want to use an external smpt server like google. On Jul 27, 9:00 am, Andre

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread Anthony
Sorry, I guess I don't understand the question then. What are the consequences of breaking into sections vs. chapters? On Jul 27, 9:58 am, mdipierro wrote: > I agree but that is not the issue now. The issue is content. I am > rewriting the book app using markmin and it allows tagging inside > pag

Re: [web2py] CLI for Application

2010-07-27 Thread Bruno Rocha
You can do that with xml-rpc or SOAP 2010/7/26 James McMillan > I have written a simple application involving a single model and a > single controller. I would also like to provide a CLI version for it. > Is it possible to run the application and be able to interact (through > print / input() or

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread mdipierro
It is me who did not explain it well. One thing is content. (main issue now) One thing is browsing. (chapters vs sections, affects how I store the data, so I'd like to settle asap, that is why I asked) One thing is searching. (you have a valid point, I am working on it, I think it will work well w

Re: [web2py] Re: Mail function not working

2010-07-27 Thread Andrew Buchan
Massimo, 192.168.200.43 is a different windows box setup as a domino server, and the smtplib example in original post works fine connecting to that server. The windows box hosting the web2py application will not normally be connected to the internet, so I can't go using google's smtp. If I recall

[web2py] Re: CLI for Application

2010-07-27 Thread mdipierro
yes, decorate function with @service.xmlrpc the rest is explained in the book On Jul 27, 9:24 am, Bruno Rocha wrote: > You can do that with xml-rpc or SOAP > > 2010/7/26 James McMillan > > > I have written a simple application involving a single model and a > > single controller. I would also

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread Anthony
Perhaps this is still being worked on, but the index tags floating on the right aren't lining up with the relevant page content. Each tag is shifted down from where it should be, and the further down the page the greater the shifting (after some scrolling, the relevant content is no longer even on

[web2py] Re: cPickle large object causes web2py to crash

2010-07-27 Thread topher.baron
There is a potential of having more than one of these objects, and they are not shared across users. I've just implemented a cache.ram solution, but I don't think I quite understand how the time_expire works. These objects are trees. This is how I've implemented the cache.ram solution: def getT

[web2py] Re: Mail function not working

2010-07-27 Thread Adi
Have you tried using telnet to verify your server and mail are correctly configured? Try this: c:\> telnet 192.168.200.43 25 ehlo mail from:the...@h**a.com recpt to: t...@h***a.com data This is a test message The recipient should be something valid. If this sends out email from y

Re: [web2py] Re: book 3rd edition call of help

2010-07-27 Thread Jonathan Lundell
On Jul 27, 2010, at 4:51 AM, mdipierro wrote: > web2py.com/book was broken into section > web2py.com/book2 is broken into chapters > > what is better? > Once printed it will be the same. Offhand I'd say chapters, so I can use my browser-native search more effectively. In that case, it might be

[web2py] Re: Can not send verification email

2010-07-27 Thread mattynoce
i did a slightly different fix in tools.py, starting on line 537: if attachments: result = mail.send_mail(sender=self.settings.sender, to=to, subject=subject, body=text, html=html,

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Jonathan Lundell
On Jul 27, 2010, at 5:33 AM, Michael Ellis wrote: > This morning I found several OSError reports about "Too many open files" in a > web2py development server that's been running locally for several days. The > app code isn't doing any explicit file i/o so I don't know what's going on, > but h

[web2py] Re: Mail function not working

2010-07-27 Thread Adi
Since you're able to use smtplib my suggestion is invalid (I didn't read carefully enough last time) Once I faced this problem, and the ehlo output did not have AUTH (which means AUTH was not enabled on the mail server), and all I did was remove mail.settings.login line and it started working. May

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
Thanks, Jonathan. That's a good suggestion. I last restarted the app a couple of hours ago. ps reports 4 processes that match 'web2py'. Grepping for each pid in lsof shows nothing extraordinary. Each process has 80-90 files open. The vast majority are libraries (.so). There are a few chr files

[web2py] Re: cPickle large object causes web2py to crash

2010-07-27 Thread mdipierro
Yes but def storeTree( p ) : cache.ram( p['treeId'], lambda:p['tree'], time_expire=0 ) and make sure p['treeId'] does not contain symbols that have a regex meaning {}[]()=_*\. On Jul 27, 10:12 am, "topher.baron" wrote: > There is a potential of having more than one of these objects, and > th

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread mdipierro
For example? On Jul 27, 10:20 am, Jonathan Lundell wrote: > On Jul 27, 2010, at 4:51 AM, mdipierro wrote: > > > web2py.com/book was broken into section > > web2py.com/book2 is broken into chapters > > > what is better? > > Once printed it will be the same. > > Offhand I'd say chapters, so I can u

[web2py] Re: Can not send verification email

2010-07-27 Thread mdipierro
in trunk now On Jul 27, 10:21 am, mattynoce wrote: > i did a slightly different fix in tools.py, starting on line 537: > >                 if attachments: >                     result = > mail.send_mail(sender=self.settings.sender, to=to, >                                             subject=

Re: [web2py] Re: Mail function not working

2010-07-27 Thread Andrew Buchan
Well it works from smtplib called from within web2py, so the server does actually work. Can't actually seem to type in what you suggested into telnet, that is an abomination of a command-line interface!!! :-) So I'm thinking it must be something in the difference between web2py's mail and smtplib's

[web2py] Re: rocket performance issues

2010-07-27 Thread mdipierro
The picture is too small. Anything interesting in there? On Jul 27, 11:01 am, Michael Ellis wrote: > Thanks for the info about sloth. I may try it later.  It was pretty easy to > get what I needed with ipython: > > procs = !ps ax | grep "web2py" > pids = [r[0] for r in procs.fields()[0:-2]] > for

[web2py] Re: Mail function not working

2010-07-27 Thread mdipierro
Please help us debug this... look into line 555 of gluon/tools.py server = smtplib.SMTP(*self.settings.server.split(':')) if self.settings.login != None: if self.settings.tls: server.ehlo() server.s

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
Sorry, what I sent was very large (~750K each). Didn't realize GoogleGroups would reduce it to a thumbnail. I'll try to forward the original message directly to you ... On Tue, Jul 27, 2010 at 12:07 PM, mdipierro wrote: > The picture is too small. Anything interesting in there? > > On Jul 27

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Jonathan Lundell
On Jul 27, 2010, at 9:01 AM, Michael Ellis wrote: > Thanks for the info about sloth. I may try it later. It was pretty easy to > get what I needed with ipython: > > procs = !ps ax | grep "web2py" > pids = [r[0] for r in procs.fields()[0:-2]] > for p in pids: > print p > !lsof | grep $

[web2py] now this is c...@_ol

2010-07-27 Thread mdipierro
http://github.com/saucelabs/monocle#readme simple yet effective

[web2py] How about LOAD(..., loading='loading...')?

2010-07-27 Thread Iceberg
Hi Massimo, So far the LOAD(...) hardcode the loading message as "loading...". I suggest to make it customizable. Such as: def LOAD(..., loading='loading...'): blah blah This way, developer has a chance to do i18n by: LOAD(..., loading='say_loading_in_chinese') or a fancy one:

Re: [web2py] Re: where to put helper functions?

2010-07-27 Thread Mathieu Clabaut
But then note that you have to pass as arguments to your helpers objects that are otherwise directly available in models and controllers, like : db, request, response, T, auth,... -Mathieu On Mon, Jul 26, 2010 at 21:03, Iceberg wrote: > Put your helpers into modules, then use local_import(...).

Re: [web2py] Re: book 3rd edition call of help

2010-07-27 Thread Jonathan Lundell
On Jul 27, 2010, at 9:03 AM, mdipierro wrote: > For example? Forms & Validators is pretty long. I could see breaking out CRUD. Right now that's not too much, but I'm hoping that the CRUD section will grow. Perhaps Validators could be its own chapter, leaving just a top-level overview in the

[web2py] database cannot be modified anymore : migration between v1.44 & current.

2010-07-27 Thread Lionel Barret
Hi all, We are moving our app from one host to the other. We used v1.44 on our old host, the new one use the current version. And as I test the new host, I discovered our database cannot be updated/written to anymore. It can be read, though as the site does work, and the admin app does display

Re: [web2py] Re: where to put helper functions?

2010-07-27 Thread Jonathan Lundell
On Jul 27, 2010, at 9:26 AM, Mathieu Clabaut wrote: > But then note that you have to pass as arguments to your helpers objects that > are otherwise directly available in models and controllers, like : db, > request, response, T, auth,... Or import them. I wrote a module to give me a nicer inter

[web2py] Re: database cannot be modified anymore : migration between v1.44 & current.

2010-07-27 Thread mdipierro
One of your fields has a length=None. Change it to a value or (better) set the type to 'text'. Massimo On Jul 27, 11:26 am, Lionel Barret wrote: > Hi all, > > We are moving our app from one host to the other. > > We used v1.44 on our old host, the new one use the current version. > > And as I te

[web2py] Re: database cannot be modified anymore : migration between v1.44 & current.

2010-07-27 Thread mdipierro
P.S. you problem is 2 years old. You may also want to replace SQLField with Field and SQLDB with DAL for aesthetic reasons. On Jul 27, 11:31 am, mdipierro wrote: > One of your fields has a length=None. Change it to a value or (better) > set the type to 'text'. > > Massimo > > On Jul 27, 11:26 am,

Re: [web2py] Re: where to put helper functions?

2010-07-27 Thread Mathieu Clabaut
On Tue, Jul 27, 2010 at 18:30, Jonathan Lundell wrote: > On Jul 27, 2010, at 9:26 AM, Mathieu Clabaut wrote: > > But then note that you have to pass as arguments to your helpers objects > that are otherwise directly available in models and controllers, like : db, > request, response, T, auth,...

[web2py] Re: OpenID supported with login method

2010-07-27 Thread keitheis
No problem. It extends the built-in login form with external login form. Like the bottom of the slice http://www.web2pyslices.com/main/slices/take_slice/28 Pic http://www.web2pyslices.com/main/static/share/images/rpxembedlocal.JPG Maybe I should name it embedded_auth_form or something else. H

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread mwolfe02
I'd vote for CHAPTERS as well, with the previously mentioned caveat that searches would need to be able to jump to the relevant section(s) within a chapter. Also, I think a fixed (ie, non-scrolling and always on-screen) sidebar with the current chapter's section table of contents allowing easy nav

[web2py] Re: OpenID supported with login method

2010-07-27 Thread mdipierro
+1. I am thinking about inclusion On Jul 27, 11:37 am, keitheis wrote: > No problem. > > It extends the built-in login form with external login form. > > Like the bottom of the > slicehttp://www.web2pyslices.com/main/slices/take_slice/28 > > Pichttp://www.web2pyslices.com/main/static/share/image

[web2py] Re: book 3rd edition call of help

2010-07-27 Thread mdipierro
oops! On Jul 27, 11:37 am, mwolfe02 wrote: > I'd vote for CHAPTERS as well, with the previously mentioned caveat > that searches would need to be able to jump to the relevant section(s) > within a chapter. > > Also, I think a fixed (ie, non-scrolling and always on-screen) sidebar > with the curre

[web2py] Re: database cannot be modified anymore : migration between v1.44 & current.

2010-07-27 Thread Lionel Barret
Sorry to be slow but I don't get it. This is what I did : * changed the sqldb to dal * changed the sqlfield to field * check that the params were good (the "text" type you mention). tested on this table, defined in db.py : -- db.define_table('product_pages', Field('title', 'string

[web2py] Re: advice on ListProperty

2010-07-27 Thread howesc
i too think that would be great. is that getting to DB specific for the DAL? cfh On Jul 25, 10:17 pm, Thadeus Burgess wrote: > Yes. > > Just go the extra half a mile and add it for every database that will > use a table behind the scenes. > > -- > Thadeus > > On Sun, Jul 25, 2010 at 6:17 PM, md

  1   2   >