[web2py] Re: Windows Service: No module named gluon.winservice

2012-03-25 Thread haggis
Thank you, Massimo! Here's the ticket: http://code.google.com/p/web2py/issues/detail?id=733 Am Montag, 26. März 2012 01:30:05 UTC+2 schrieb Massimo Di Pierro: > > Looks like it is not finding the gluon folder. Please open a ticket and I > will look at it asap. > > Massimo > > On Sunday, 25 March

[web2py] Re: Documentation suggestion

2012-03-25 Thread weheh
I think I made this point a couple of years ago. I'm too lazy to go and try to dig up the thread. Here's my 10 cents. I agree strongly that the current manual tries to be both introductory tutorial and reference. I also agree it's been hugely improved since v1 and is extremely useful. The cookbook

[web2py] Re: 10.24$ reward for a recipe logging a user

2012-03-25 Thread bussiere adrien
it's more a logical problem than your framework. I just want to know how to log a user. Bussiere Le lundi 26 mars 2012 01:35:04 UTC+2, Massimo Di Pierro a écrit : > > I have been on the road and hard to keep up up with posts. If this issue > is still open please open a ticket so it can be track

[web2py] Re: Bug? The DAL gives different SQL when query is provided as string.

2012-03-25 Thread Limedrop
The difference is in the FROM clause. In the second SQL the webpage table is missing. On Mar 26, 12:51 pm, Niphlod wrote: > is that because of the "extra" () ? > every time you call db() the where clause gets "encapsulated" in a pair of > parenthesis. > > db(db.auth_user.id>0)(db.auth_user.email

[web2py] Re: Bug? The DAL gives different SQL when query is provided as string.

2012-03-25 Thread Niphlod
is that because of the "extra" () ? every time you call db() the where clause gets "encapsulated" in a pair of parenthesis. db(db.auth_user.id>0)(db.auth_user.email==localhost) and db((db.auth_user.id>0) & (db.auth_user.email==localhost)) give you different raw strings, but the same exact resu

Re: [web2py] Re: DAL or SQL?

2012-03-25 Thread Niphlod
Doh, you're right. All the "datetime" api on fields are extracting, not converting the actual value At this point you can sum up years difference, month difference, etc etc etc separately and then extract the time passed by. . duration_ye = (db.periods.end_time.year() - db.periods.start_

[web2py] Re: _title tag for looped OPTION attribute

2012-03-25 Thread Massimo Di Pierro
works for me. $ python web2py.py -S welcome >>> print OPTION(_title='test',_value='x') On Sunday, 25 March 2012 16:34:51 UTC-5, Alan Etkin wrote: > option = OPTION(...) > option["_title"] = "test test" > > doesn't work either? > > On 25 mar, 17:25, web-dev-m wrote: > > I may not be follow

[web2py] Re: 10.24$ reward for a recipe logging a user

2012-03-25 Thread Massimo Di Pierro
I have been on the road and hard to keep up up with posts. If this issue is still open please open a ticket so it can be tracked. On Sunday, 25 March 2012 11:57:20 UTC-5, bussiere adrien wrote: > > I want to create myself a user then log him. > This for an open source project : > https://github.

[web2py] Re: Documentation suggestion

2012-03-25 Thread Massimo Di Pierro
Good point. Not split it up but we need a second more introductory, manual. massimo On Sunday, 25 March 2012 12:00:44 UTC-5, backseat wrote: > > If something like this has already been suggested, please point me at the > earlier discussion. > > I've read the Web2py manual (and bought three of the

[web2py] Re: Windows Service: No module named gluon.winservice

2012-03-25 Thread Massimo Di Pierro
Looks like it is not finding the gluon folder. Please open a ticket and I will look at it asap. Massimo On Sunday, 25 March 2012 08:47:41 UTC-5, haggis wrote: > > Hello, > I'm trying to start web2py as a Windows (XP) service. After installing the > pywin32 extension all errors at command line w

[web2py] Re: Windows Service: No module named gluon.winservice

2012-03-25 Thread Massimo Di Pierro
On Sunday, 25 March 2012 08:47:41 UTC-5, haggis wrote: > > Hello, > I'm trying to start web2py as a Windows (XP) service. After installing the > pywin32 extension all errors at command line were gone. However, the > service doesn't start. > > This is what happens: > > #python web2py.py -W insta

[web2py] Re: Error deploying at djangoeurope with Rocket and webproxy.

2012-03-25 Thread Cody Moniz
Try doing this before starting web2py: ulimit -s 1024

[web2py] Re: web2py rocket error on vps

2012-03-25 Thread Unyo
I finally figured out why this is happens. If you have a small VPN like i do (tinyvpn on ipxcore, 96MB ram), the thread size (8MB) will cause a very small amount of threads to be allowed. To fix this, enter the command below: ulimit -s 1024 http://www.alak.cc/2011/11/python-threaderror-cant-s

[web2py] Re: _title tag for looped OPTION attribute

2012-03-25 Thread Alan Etkin
option = OPTION(...) option["_title"] = "test test" doesn't work either? On 25 mar, 17:25, web-dev-m wrote: > I may not be following some sort of convention, but I'm trying to > build a selector form element with a for loop from a query.  It > renders when i do it manually: > > > > > > Howerv

Re: [web2py] 10.24$ reward for a recipe logging a user

2012-03-25 Thread bussiere adrien
it's created i've made a page to list all user for debugging and i see the new users :/ The project is here : https://github.com/bussiere/jackpoint/blob/master/applications/init/controllers/default.py i've made a function to list user and it work the user is created. Bussiere Le dimanche 25

Re: [web2py] 10.24$ reward for a recipe logging a user

2012-03-25 Thread villas
Suggestion 1: check whether 'user' has a value after this line: >>user = auth.login_bare("titi",​password) If user is None then maybe you didn't create the user properly. Suggestion 2: This function may be useful: (in Auth) get_or_create_user() I don't think it is documented in the book at

[web2py] _title tag for looped OPTION attribute

2012-03-25 Thread web-dev-m
I may not be following some sort of convention, but I'm trying to build a selector form element with a for loop from a query. It renders when i do it manually: Howerver, when I do: files=db(myquery).select() files_as_list=[] for x in files: files_as_list+=(OPTION(x.resour

Re: [web2py] Re: DAL or SQL?

2012-03-25 Thread Keith Edmunds
On Mon, 19 Mar 2012 14:45:51 -0700 (PDT), niph...@gmail.com said: > for every "period", duration is calculated as: > duration = db.periods.end_time.seconds() - > db.periods.start_time.seconds() This is wrong. I reworked my data model so that the period start and stop fields were of type datetime

Re: [web2py] 10.24$ reward for a recipe logging a user

2012-03-25 Thread bussiere adrien
It still redirect me to the the auth page with the login form Bussiere Le dimanche 25 mars 2012 19:37:44 UTC+2, Vasile Ermicioi a écrit : > > that works for me > > def test(): > password="toto" > my_crypt = CRYPT(key=auth.settings.hmac_​key) > crypt_pass = my_crypt(password)[0]

Re: [web2py] 10.24$ reward for a recipe logging a user

2012-03-25 Thread Vasile Ermicioi
that works for me def test(): password="toto" my_crypt = CRYPT(key=auth.settings.hmac_key) crypt_pass = my_crypt(password)[0] if db(db.auth_user.email == 'email5@toto').count() == 0: db.auth_user.insert( Surnom="Surnom", email="email5@toto",

[web2py] Documentation suggestion

2012-03-25 Thread Keith Edmunds
If something like this has already been suggested, please point me at the earlier discussion. I've read the Web2py manual (and bought three of them) since v1, and the quality of both web2py and the manual has improved hugely. To my mind, however, the manual tries to fulfil two roles currently: it

[web2py] 10.24$ reward for a recipe logging a user

2012-03-25 Thread bussiere adrien
I want to create myself a user then log him. This for an open source project : https://github.com/bussiere/jackpoint I've been on it for 3 days now. I want to create a user then loggin him and auth him. If you find it just give me your paypal in private buy you a drink. Here is my code : def tes

[web2py] Re: Acces a page with @auth.requires_login() don't work

2012-03-25 Thread bussiere adrien
How to log out in command line ? But the main goal is that i want to tempory log a user with a dummy password. He gives me the invitation i log him with a pre user made myself with the invitation as the password. And them i give him a form inscription to make a full user. So i need to log him my

[web2py] Re: Acces a page with @auth.requires_login() don't work

2012-03-25 Thread Sushant Taneja
Just a thought here, but have you tried logging out and logging in again with the same password. Does it work ? On Sunday, March 25, 2012 3:47:53 PM UTC+5:30, bussiere adrien wrote: > > i've created and logged my user with : > > password="toto" > my_crypt = CRYPT(key=auth.settings.hmac_​key) > cr

[web2py] Re: Windows Service: No module named gluon.winservice

2012-03-25 Thread haggis
Using web2py 1.99.4 stable

[web2py] Re: auth profile redirect

2012-03-25 Thread Anthony
auth.settings.profile_next = URL(...) Note, that should already be set to URL('default', 'index') (assuming your auth user() function is in the default.py controller). Anthony On Sunday, March 25, 2012 5:26:08 AM UTC-4, Hassan Alnatour wrote: > > Dear ALL , > > How can i redirect the user afte

[web2py] Windows Service: No module named gluon.winservice

2012-03-25 Thread haggis
Hello, I'm trying to start web2py as a Windows (XP) service. After installing the pywin32 extension all errors at command line were gone. However, the service doesn't start. This is what happens: #python web2py.py -W install - no errors - #python web2py.py -W start [...] Starting hardcron... S

[web2py] Acces a page with @auth.requires_login() don't work

2012-03-25 Thread bussiere adrien
i've created and logged my user with : password="toto" my_crypt = CRYPT(key=auth.settings.hmac_key) crypt_pass = my_crypt(password)[0] user = db.auth_user.insert( Surnom="Surnom", email="email", password=crypt_pass, ) db.commit() sess

[web2py] auth profile redirect

2012-03-25 Thread Hassan Alnatour
Dear ALL , How can i redirect the user after he saves his profile ?

[web2py] Re: Markmin - could we use instead of ?

2012-03-25 Thread villas
Many thanks!