[web2py] Why web2py is in French by default? How can I change it?

2011-09-15 Thread Zhe Li
Hi, I tried to find something in web2py book, but everything is in French now. (Wasn't like this yesterday) I am sure I have set my browser to English, anything wrong? Cheers, Zhe

[web2py] Re: Facebook/Twitter/Google login + normal login

2010-10-25 Thread Zhe Li
Hi Cfh, I tried to deploy your modules into my web2py app but failed. The error message is: Traceback (most recent call last): File "/home/zhe/workspace/gaoshi/web2py/gluon/restricted.py", line 188, in restricted exec ccode in environment File "/home/zhe/workspace/gaoshi/web2py/applicatio

[web2py] Re: Book in Italian, Spanish, Portuguese, Chinese and Russian (sort of)

2010-08-09 Thread Zhe Li
English->Chinese is far far from okay:) Cheers, Zhe On Aug 9, 3:10 am, mdipierro wrote: > I have been playing with google translate and I managed to get a > complete translation of the book in Italian, Spanish, Portuguese, > Chinese and Russian. > > DISCLAMER: > > - The translation is bad but fo

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-08 Thread Zhe Li
Finally!! It works now! I switched my dev server to ubuntu 9.10 and everything works now! I couldn't find a repository for python2.5- psycopg2 in ubuntu 10.04 so I didn't try that. Regards, Zhe On Aug 8, 8:57 pm, Zhe Li wrote: > Just now I found that it was using python2.5

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-08 Thread Zhe Li
Just now I found that it was using python2.5 and python2.5-psycopg2 in the script, but in ubuntu 10.04 they have been removed from repository. I will try to re-install it manually. Cheers, Zhe On Aug 8, 8:27 pm, Zhe Li wrote: > Just an interesting note. Yesterday after the fresh re-installat

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-08 Thread Zhe Li
g2 with apt-get it should set the path correctly. Cheers, Zhe On Aug 8, 8:18 pm, Zhe Li wrote: > Hi, > > I changed > > local   all         web2py                            ident > > to > > local   all         all                            md5 > > in pg_hba.conf

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-08 Thread Zhe Li
lem with permissions of contect of databases > folder. Make sure the apache/www-data user has permissions to read and > write > > On Aug 8, 6:32 am, Zhe Li wrote: > > > > > Hi Massimo, > > > Yes this time I was running it from a fresh installed ubuntu server

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-08 Thread Zhe Li
Whoops, I was using local all web2pymd5 in pg_hba.conf. /Zhe On Aug 8, 1:32 pm, Zhe Li wrote: > Hi Massimo, > > Yes this time I was running it from a fresh installed ubuntu server so > PostgreSQL was using the default port. > > I change

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-08 Thread Zhe Li
DB at port 1216 or 5432? > Can you try with pool_size=0 just to isolate the problem. > > On Aug 7, 6:42 pm, Zhe Li wrote: > > > > > Hi Massimo, > > > I am using PostgreSQL 8.4. > > > I added print(msg) and got the message when runnning python web2.py -a

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-07 Thread Zhe Li
s, I successfully added a table and a test record... Thank you! Cheers, Zhe On Aug 7, 5:30 pm, mdipierro wrote: > One more test: > > In gluon/sql.py > > before line 957, print your connection string: >    print msg > Would that connection string work on the shell? Which pos

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-06 Thread Zhe Li
Yeah, that works fine. It's so odd and frustrating... On Aug 6, 1:25 pm, mdipierro wrote: > I have no idea. Can you connect from a pure python shell using the > driver API? > > On Aug 6, 5:55 am, Zhe Li wrote: > > > > > thanks! > > I tried to replace localh

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-06 Thread Zhe Li
ng on > localhost > > On Aug 6, 5:25 am, Zhe Li wrote: > > > > > Hi, > > > Thanks! This is the result from trunk. > > > Error traceback > > Traceback (most recent call last): > >   File "gluon/restricted.py", line 186, in restricted >

[web2py] Re: Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-06 Thread Zhe Li
216? (tried 5 times)) Python 2.6.5: /usr/bin/python This is odd since I can connect to it both from command-line and another machine using web2py account Cheers, Zhe On Aug 6, 11:06 am, mdipierro wrote: > Please check the version in trunk. It should give you a more detailed > error. &

[web2py] Failed to connect to PostgreSQL, deployed with setup_web2py_ubuntu.sh.

2010-08-06 Thread Zhe Li
Hello everyone, I tried to deploy web2py on my ubuntu server using setup_web2py_ubuntu.sh. Everything seemed fine except when I switch database from SQLite to PostgreSQL I got: Error traceback Traceback (most recent call last): File "gluon/restricted.py", line 178, in restricted exec ccode

[web2py] Re: Cannot connect to MySQL if using ngnix+fcgi+web2py

2010-08-05 Thread Zhe Li
ou are > running:http://sourceforge.net/projects/mysql-python. Check the DAL > documentation:http://web2py.com/book/default/chapter/06#The-Database-Abstraction-Layer > > Thanks, > rAm > > i Think, i Wait, i Fast -- Siddharthahttp://sodidi.ramjeeganti.com > > > > On Thu, Au

[web2py] Cannot connect to MySQL if using ngnix+fcgi+web2py

2010-08-05 Thread Zhe Li
Hi, I am using ngnix+fcgi with web2py. Just today I switched the database from SQLite to MySQL. But it seems web2py failed to connect to mysql if using fcgi+ngnix. Launch it by "python web2py.py" works fine. The error looks like this: Error traceback Traceback (most recent call last): File "/hom

[web2py] Cannot connect to MySQL if using ngnix+fcgi+web2py

2010-08-05 Thread Zhe Li
Hi, I am using ngnix+fcgi with web2py. Just today I switched the database from SQLite to MySQL. But it seems web2py failed to connect to mysql if using fcgi+ngnix. Launch it by "python web2py.py" works fine. The error looks like this: Error traceback Traceback (most recent call last): File "/h

[web2py] Re: How to store images sent using standard POST multipart/form-data encoding?

2010-07-28 Thread Zhe Li
Haha, works like a charm!! Thank you Massimo! On Jul 28, 2:48 pm, mdipierro wrote: > db(db.poll.id == 12).update(image > =db.poll.image.store(request.vars.upload_file.file,request.vars.upload_file > .filename)) > > On Jul 28, 6:05 am, Zhe Li wrote: > > > > > Hel

[web2py] How to store images sent using standard POST multipart/form-data encoding?

2010-07-28 Thread Zhe Li
Hello everyone! I am try to upload some pictures from safari on iPod, using this method http://www.cliqcliq.com/support/quickpic/#web-app-integration and uploads are sent using standard POST multipart/form-data encoding. This is my code for receiving submissions:

[web2py] Re: IS_NOT_IN_DB with complex db field validation.

2010-07-17 Thread Zhe Li
l.author == > user_id), >                                         'poll.question', >                                          error_message = 'Question > already existed!')] > > On Jul 17, 2:30 pm, Zhe Li wrote: > > > > > Hi Mr.Freeze, > > > It said KeyErro

[web2py] Re: IS_NOT_IN_DB with complex db field validation.

2010-07-17 Thread Zhe Li
eyError: 'poll' also in db.py I assigned user_id as auth.user.id: if auth.is_logged_in(): user_id = auth.user.id else: user_id = None Thanks Zhe On Jul 17, 9:03 pm, "mr.freeze" wrote: > What does the error say? > > On Jul 17, 1:47 pm, Zhe Li wrote

[web2py] IS_NOT_IN_DB with complex db field validation.

2010-07-17 Thread Zhe Li
Hello everyone, I was trying to do a validation in db.py like: db.define_table('poll', SQLField('question', 'text', requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db(db.poll.author == user_id), 'poll.question', error_message = 'Question already existed!')], length=120) SQLField('author', db.auth_user, de

[web2py] Re: form bug?

2010-05-23 Thread Zhe Li
#x27;target');" % > URL(r=request,f='get_info'))), > > On May 23, 6:50 am, mdipierro wrote: > > > > > _onkeyup="ajax('%s',['keyword'], 'target');" % > > URL(r=request,f='get_info'))), > &

[web2py] form bug?

2010-05-23 Thread Zhe Li
Hi, There seems to be an issue with submission AJAX data in form. Remove welcome and example applications first and make a new app called init. Again I was using this example: default.py - def index(): response.subtitle = '' return dict(form=FORM('username', INPU

[web2py] Re: Ajax examples not working for me

2010-05-07 Thread Zhe Li
Thanks Mr.Freeze! Yes, it works now!! Regards, Zhe On May 7, 9:48 am, "mr.freeze" wrote: > I think you want your pattern to be: > pattern = '%' + request.vars.keyword.lower() + '%' > > instead of : > pattern = '+ request.vars.keywor

[web2py] Re: Ajax examples not working for me

2010-05-07 Thread Zhe Li
. can you try with firefox? can you also try > with the firebug extension? I will log the ajax requests so you can > see if there is an error? > > On May 6, 10:01 am, Zhe Li wrote: > > > > > Hi, > > > I am new to web2py and it is a fantastic framework! The online b

[web2py] Ajax examples not working for me

2010-05-06 Thread Zhe Li
Hi, I am new to web2py and it is a fantastic framework! The online book is quite helpful until this week. I tried two AJAX examples but none of them works and I don't have a clue what went wrong there. First one is the wiki example: - def search(): "an ajax wi