[web2py] Selecting whole record with MIN query

2016-01-02 Thread UG
Hi, If i have the following table ID fist_name last_name city age I use the MIN to find the lowest age youngest = db(db.people.city == "London").select(db.people.age.min()).first() This will only give me the lowest age in the city. Is there a way to get the complete record in the first

[web2py] Re: Selecting whole record with MIN query

2016-01-02 Thread UG
mp; > (db.people.age.belongs( > db(db.people.city == 'London')._select(db.people.age.min()) > )).select() > ).select(orderby=db.people.age, limitby=(0,1)) > > On Saturday, January 2, 2016 at 3:41:49 PM UTC+1, DenesL wrote: >> >> You could do >> >> db(d

[web2py] Re: autocomplete basic confusion

2015-03-16 Thread UG
Hi, I am not sure i follow your question 100%. Is this what you need? db.define_table('stuff', Field('nombre', 'string', requires=IS_NOT_EMPTY()), format='%(nombre)s') On Saturday, March 14, 2015 at 2:33:13 PM UTC-7, Phil Hughes

[web2py] Re: When not HTTPS i receive TypeError: 'NoneType' object is not callable

2015-03-01 Thread UG
with some testing I managed to find a cause to it, though i am not sure why. To summarize. i had not changed Apache configuration since install. (Debian stable) The application was running without a problem. I then did some updates to the application on my local machine and pushed them up to

[web2py] When not HTTPS i receive TypeError: 'NoneType' object is not callable

2015-02-25 Thread UG
Hi, I am receiving an error when i access my app from non SSL . i have set request.requires_https() It used to redirect to HTTPS but now it just gives me the error below. i don' even know where to start. i have looked for anyplace i am storing variables in session , but i am not. any ideas?

[web2py] Re: When not HTTPS i receive TypeError: 'NoneType' object is not callable

2015-02-25 Thread UG
and if HTTPS is the firs then requests on port 80 will generate the error. i have tailed the Apache error logs when this is happening and there is nothing. On Wednesday, February 25, 2015 at 8:38:29 AM UTC-8, UG wrote: Hi, I am receiving an error when i access my app from non SSL . i have

[web2py] Re: stoping database insert in onvalidation

2015-01-22 Thread UG
Thank you , i understand now. On Wednesday, January 21, 2015 at 12:16:56 PM UTC-8, Niphlod wrote: read the book about onvalidation http://web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation . If you want to stop the form from being processed, you have to fill

[web2py] Stop a db insert on validation

2015-01-21 Thread UG
Hi, I am using on validation to check for text strings in a form . Is there a way i stop the database insert happening if the strings are matched ? so far i am only able to remove the words. Thanks def check(form): check = [this word, or this word] for x in check: if

[web2py] stoping database insert in onvalidation

2015-01-21 Thread UG
Hi, i tried to post earlier today but it didn't seem to go through. so please forgive me if this appears to be a double post. i am using onvalidation to call a check on the content of the form vars. if the content matches i would like to stop the form being saved in to the database . i know

[web2py] Re: Stripe - Create a customer.

2015-01-18 Thread UG
, but the above worked for me. Hope it helps On Friday, January 16, 2015 at 10:32:50 PM UTC-8, Massimo Di Pierro wrote: The StripeForm does not support it. Sorry. You have to use their API. On Friday, 16 January 2015 20:13:25 UTC-6, UG wrote: Hi, i am a beginner in python and web2py. i am using

[web2py] Stripe - Create a customer.

2015-01-16 Thread UG
Hi, i am a beginner in python and web2py. i am using the stripe form in web2py to process credit cards. It is simple and all works when i make a test. what i want to do is make what stripe calls a customer so that i can make a charge at a later time. i tried to read through the stripe file