[web2py] Re: Cant get emails to send from Google App Engine App

2012-01-07 Thread Ben
Substitute the stuff in quotes with your info: mail.settings.sender = m...@mydomain.com mail.settings.login = m...@mydomain.com:mypassword Notes: This gae setting (vs. smtp.gmail.com:587) works for me with a Google Apps hosted email, but I've found it doesn't seem to work from the

[web2py] Re: db unique=True Not working

2012-01-07 Thread Alan Etkin
I think that requires=IS_EMPTY_OR(IS_IN_DB(...)) should give the user the options plus an empty option to leave the field blank, but i am not sure if the value stored is null if empty is selected. On Jan 7, 12:51 am, Bruce Wade bruce.w...@gmail.com wrote: Ok thanks I was trying that except I

[web2py] Alternative for GROUP BY in app-engine

2012-01-07 Thread sabbir
Hi All, Wondering how to best implement GROUP BY in google app-engine, on large data set. Example Entity: Transaction (sl, accountsCode, accountsName, amount, status) Then what is the best approach to do something like this in app- engine: select accountsCode, sum(amount) What I can do with

[web2py] column auth_user.registration_id does not exist ERROR AFTER UPGRADE to 1.99

2012-01-07 Thread david.waldrop
after an upgrade to 1.99 i get an error stating as in the subject above when trying to login. I tried to use the admin interface to inspect the auth_user table, but get the same error in the admin interface. Did something change to the table structures? if so, any idea how I can fix?

Re: [web2py] Re: db unique=True Not working

2012-01-07 Thread Bruce Wade
Thanks Alan, I will give that a try. -- Regards, Bruce On Sat, Jan 7, 2012 at 2:32 AM, Alan Etkin spame...@gmail.com wrote: I think that requires=IS_EMPTY_OR(IS_IN_DB(...)) should give the user the options plus an empty option to leave the field blank, but i am not sure if the value stored

[web2py] Re: define_table - how to do this correctly (best practice?)

2012-01-07 Thread lyn2py
Bump. Help anyone? Can default be equal to a variable dependent on another field in the same table? Thanks! On Jan 6, 6:10 am, lyn2py lyn...@gmail.com wrote: What you say is true, however for argument's sake, how could I achieve the above with the 4th table? In my situation, the 3 tables

[web2py] Re: define_table - how to do this correctly (best practice?)

2012-01-07 Thread Anthony
Can default be equal to a variable dependent on another field in the same table? I haven't looked at your original question in detail, but regarding the above question about defaults, no, they can't be dependent on other fields in the same table (though they can be dependent on

[web2py] Re: Mobile OTP (motp) and other OTP login methods for web2py

2012-01-07 Thread howesc
sounds cool. the formula will be similar to what i did here to add facebook, twitter, google accounts auth to web2py: http://www.web2pyslices.com/slices/take_slice/77 obviously the custom methods will interact with OTP, but the formula should be similar. cfh

[web2py] Re: column auth_user.registration_id does not exist ERROR AFTER UPGRADE to 1.99

2012-01-07 Thread Alan Etkin
Seems like a bug. Could you post the error traceback? It happens with every application in the web2py installation? On Jan 7, 11:21 am, david.waldrop david.wald...@gmail.com wrote: after an upgrade to 1.99 i get an error stating as in the subject above when trying to login.  I tried to use the

[web2py] Re: define_table - how to do this correctly (best practice?)

2012-01-07 Thread lyn2py
Thanks Anthony, will look into the areas you mentioned! :) On Jan 8, 12:35 am, Anthony abasta...@gmail.com wrote: Can default be equal to a variable dependent on another field in the same table? I haven't looked at your original question in detail, but regarding the above question about

Re: [web2py] Re: web2py on github

2012-01-07 Thread Bruce Wade
If anyone is interested I found assembla.com which allows unlimited repositories, with unlimited members for both public and private projects. On Thu, Dec 22, 2011 at 5:45 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: No problem at all Daniel, I welcome the discussion. I am just

[web2py] Re: Packaging web2py + application

2012-01-07 Thread LightDot
Yes, rpmbuild with spec files. Actually, I build packages for several architectures and OS versions, so I use mock - a tool that builds** RPMs in a clean, chrooted environment. But that's pretty much equivalent to plain rpmbuild with chroot and some additional automation.

[web2py] Re: column auth_user.registration_id does not exist ERROR AFTER UPGRADE to 1.99

2012-01-07 Thread Massimo Di Pierro
What did you upgrade from? Are migrations on? It is possible you upgraded from an old web2py and it needs to create the auth_user.registration_id which was added about 1 year ago. On Jan 7, 8:21 am, david.waldrop david.wald...@gmail.com wrote: after an upgrade to 1.99 i get an error stating as

[web2py] best way to process date deltas?

2012-01-07 Thread Adrian Edwards
Hello, What's the best way to calculate deltas between 2 dates? For example I need to calculate how many days are inbetwen 12/31/2011 and today. Then if the delta is a factor of 7 (weekly) do something. Thanks. Adrian

[web2py] Re: processing user input

2012-01-07 Thread Adrian Edwards
Thank you both, I appreciate the help. On Jan 2, 9:33 pm, Anthony abasta...@gmail.com wrote: You can use the 'onvalidation' callback:http://web2py.com/books/default/chapter/29/7#onvalidation form.process(..., onvalidation=my_form_calculation) You can also define a custom validator for the

Re: [web2py] best way to process date deltas?

2012-01-07 Thread Bruno Rocha
from datetime import datetime, timedelta factor = timedelta(7) now = datetime.now() past_week = now - factor past_week datetime.datetime(*2011, 12, 31*, 18, 12, 22, 417567) On Sat, Jan 7, 2012 at 6:06 PM, Adrian Edwards aedward...@gmail.com wrote: Hello, What's the best way to

Re: [web2py] best way to process date deltas?

2012-01-07 Thread Bruno Rocha
Also: import datetime as dt date1 = dt.datetime.strptime('2011-12-31', '%Y-%m-%d') date2 = dt.datetime.now() diff = date2 - date1 diff datetime.timedelta(7, 65912, 169900) diff.days 7 -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] Re: Alternative for GROUP BY in app-engine

2012-01-07 Thread sabbir
It seems reading data sequentially is the only option and is costly. My entities are already de-normalized to some extent and I cant keep counter to a separate table as reports can have conditions like date range and other parameters. Now the big question is the cost of sequential search in term

[web2py] Updated: uwsgi + nginx script for Ubuntu 11.10

2012-01-07 Thread Bruce Wade
Hi, I was having problems running setup-web2py-nginx-uwsgi-ubuntu.sh on Ubuntu 11.10 primary because of uwsgi install instructions. I have edited the script which is working now and attached to this message for anyone who runs into the same problem. -- -- Regards, Bruce Wade

[web2py] Can't configure web2py with apache via xampp

2012-01-07 Thread Likit
Nothing I am doing works. None of the web pages have answers. I am not confident in the web2py book, which contains many errors. The problem appears to be that web2py insists that the admin pages are accessed via ssl for the login but doesn't require (of course) ssl for the ordinary

[web2py] Re: Can't configure web2py with apache via xampp

2012-01-07 Thread Anthony
I am not confident in the web2py book, which contains many errors. Feel free to report any errors here, and they will be corrected.

[web2py] Re: Can't configure web2py with apache via xampp

2012-01-07 Thread Anthony
The problem appears to be that web2py insists that the admin pages are accessed via ssl for the login but doesn't require (of course) ssl for the ordinary applications. Note, for local requests, admin does not require an SSL connection, so in development, no need for the second port.

[web2py] Significant overhead with each define_table()

2012-01-07 Thread James M.
I just did some simple load tests on a web app I am working on. I was using apache bench (ab -n 1000 -c 100) and getting results that were much slower than expected. The Requests/Second were ~ 26. For comparison I did the same test against the welcome app and I was getting ~ 59 Requests/Second

[web2py] Re: Alternative for GROUP BY in app-engine

2012-01-07 Thread dlypka
some relevant discussion is here: http://groups.google.com/group/google-appengine-java/browse_thread/thread/3dfe0f3268cd7e27

[web2py] Re: Significant overhead with each define_table()

2012-01-07 Thread Massimo Di Pierro
The code in models is executed at every http request. The longer the models, the more slow down. Yet the slow down you get is larger than I would have expected. I did some tests about this long ago and I found this issue to be negligible. Let us know what you find and I will take a look too.