Re: [web2py] Pre-fill email address on failed login?

2011-06-06 Thread David J
Keepvalues in form On Jun 6, 2011 7:51 PM, "pbreit" wrote: > I'm trying to pre-fill the email address field on a failed login but can't > seem to figure out if the default/user() function can access any of the > submitted inputs. That probably should be default functionality anyway.

Re: [web2py] Re: OAuth2.0 and Facebook (as from the book)

2011-06-06 Thread Sebastian E. Ovide
I do not see major pros and cons... it is a matter of precerences... 1) setting username=True in auth.define_tables(), define_tables will add a field on the table (username) and if that field is present, authentication will be done using username. Personally I prefer to use emails rather than user

[web2py] SQL help

2011-06-06 Thread DJ
Is this query possible in web2py? SELECT * FROM `shirts` WHERE `color` IN ('red','white','blue') -Sebastian

Re: [web2py] SQL help

2011-06-06 Thread Marin Pranjic
Yes, it is. It should be something like db(db.shirts.color.belongs(['red', 'white', 'blue']).select() On Tue, Jun 7, 2011 at 2:18 AM, DJ wrote: > Is this query possible in web2py? > > SELECT * FROM `shirts` WHERE `color` IN ('red','white','blue') > > -Sebastian >

[web2py] Re: SQL help

2011-06-06 Thread pbreit
"belongs": http://web2py.com/book/default/chapter/06#belongs

Re: [web2py] Pre-fill email address on failed login?

2011-06-06 Thread pbreit
How do I set that for an Auth form?

Re: [web2py] SQL help

2011-06-06 Thread DJ
Thank you! This works!

[web2py] Re: SQL help

2011-06-06 Thread DJ
Perfect! Thanks!

Re: [web2py] Re: SQL help

2011-06-06 Thread Stifan Kristi
is it possible to use belongs to replace IS_IN_SET validation in database definition? thank you On Tue, Jun 7, 2011 at 7:29 AM, pbreit wrote: > "belongs": > http://web2py.com/book/default/chapter/06#belongs >

Re: [web2py] Re: components and timers

2011-06-06 Thread Anthony
On Monday, June 6, 2011 7:47:48 PM UTC-4, David J wrote: > > Seeing that comet is not widely supportted I was wondering if there was an > ajax poll example? > I think there's some terminology confusion. "comet" *is* widely supported, as it involves long-held HTTP requests via streaming or Ajax l

Re: [web2py] Re: SQL help

2011-06-06 Thread pbreit
I'm not sure I understand the question. Validators apply to forms. "belongs" is used to query the database.

Re: [web2py] Re: SQL help

2011-06-06 Thread Stifan Kristi
a, i c, i mean in database definition that have field type list:string, have the valid value that is describe in belongs, is it possible or not? thank you. On Tue, Jun 7, 2011 at 7:58 AM, pbreit wrote: > I'm not sure I understand the question. Validators apply to forms. > "belongs" is used to q

Re: [web2py] Re: components and timers

2011-06-06 Thread Anthony
Getting back to the original question, if the refreshes need to happen at fixed (and not too frequent) intervals (rather than at indeterminate times, whenever the data happen to be ready), it may be simpler to just use short-polling -- see https://groups.google.com/d/topic/web2py/xJjTeowYk0U/di

Re: [web2py] Re: components and timers

2011-06-06 Thread Bruno Rocha
I am using comet for an application, and it is working fine, notice that i am running 2 servers on linode, one is only for host the queue. For compatibility I am using this https://github.com/gimite/web-socket-js (it is flash based, but works fine and even facebook and grooveshark uses this) --

[web2py] Re: SyntaxError: Object exists and cannot be redefined: lunid

2011-06-06 Thread Mike Veltman
And that was it... Thank you very much. Mmmm, this should go in the book.. > db.lvstorage.lunid = 4 > > should be (I guess) > > db.lvstorage.lunid.default = 4 > > On Jun 6, 4:12 am, Mike Veltman wrote: > > I try to pre populate a form and I think I do something wrong but I stare > > at it f

[web2py] Optimising web2py for GAE

2011-06-06 Thread Matt
Hi there, Can anyone provide me with some suggestions on how to optimise web2py for GAE? At present the code I've got deployed (based on Version 1.96.3 (2011-06-06 16:16:02) seems incredibly slow. I keep getting DeadlineExceededExceptions and timeouts for simple request / responses like this: 1

Re: [web2py] Re: SyntaxError: Object exists and cannot be redefined: lunid

2011-06-06 Thread Anthony
On Monday, June 6, 2011 9:15:27 PM UTC-4, Gwayne aka Mike Veltman wrote: > > > And that was it... > > Thank you very much. Mmmm, this should go in the book.. > There's also this method of pre-populating a form field: http://web2py.com/book/default/chapter/07#Pre-populating-the-form

[web2py] Re: OAuth2.0 and Facebook (as from the book)

2011-06-06 Thread Massimo Di Pierro
I am not familiar with facebook email. If this (username + @facebook) is avlid email, perhaps web should set that even if username=True On Jun 6, 7:15 pm, "Sebastian E. Ovide" wrote: > I do not see major pros and cons... it is a matter of precerences... > > 1) setting username=True in auth.defin

Re: [web2py] Pre-fill email address on failed login?

2011-06-06 Thread David J.
Now that I am in front of my app; I see what you are saying; If you try to login with both user and password and the login fails the email is not re-populated. If you enter the form with the email and no password the email is populated still; Not sure if it is a bug or what; Sorry if I mi

[web2py] Checkboxes to select records.

2011-06-06 Thread David J.
How do I add a checkbox to each row in the table to let the user select and then press delete to delete the selected row? Is there a SLICE for this? Thanks.

[web2py] Re: How to start web2py server permanently

2011-06-06 Thread Rahul
Alternately, you can use the nohup command if you have shell access. Like nohup python web2py.py - a'' -i -p & This will last till your server machine is re-booted. If it has, it will terminate. Cheers, Rahul On Jun 6, 11:58 pm, danto wrote: > 2011/6/6 Pradeesh > > > I have installed web

[web2py] request.is_local

2011-06-06 Thread LightOfMooN
What is logic of request.is_local? I tried use it to prevent direct access to some included blocks: def index(): return dict() def some_block(): if request.is_local: do_smth() return dict(smth=smth) else: return None index.html: {{=LOAD('mycontroller', 'som

Re: [web2py] Re: How to start web2py server permanently

2011-06-06 Thread pradeesh narayan
Thank you Rahul... Its worked fine. Thanks once again for your help. On Tue, Jun 7, 2011 at 7:12 AM, Rahul wrote: > Alternately, you can use the nohup command if you have shell access. > Like > > nohup python web2py.py - a'' -i -p > & > > This will last till your server machine is re-booted.

Re: [web2py] Re: How to start web2py server permanently

2011-06-06 Thread Manuele Pesenti
On 07/06/2011 08:00, pradeesh narayan wrote: Thank you Rahul... Its worked fine. Thanks once again for your help. you got another chance here http://www.web2py.com/book/default/chapter/11#Start-as-Linux-Daemon Manuele

[web2py] Re: SyntaxError: Object exists and cannot be redefined: lunid

2011-06-06 Thread Mike Veltman
> On Monday, June 6, 2011 9:15:27 PM UTC-4, Gwayne aka Mike Veltman wrote: > > And that was it... > > > > Thank you very much. Mmmm, this should go in the book.. > > There's also this method of pre-populating a form field: > http://web2py.com/book/default/chapter/07#Pre-populating-the-form Yes I

<    1   2