[web2py] Re: validate_and_insert() doesn't work for compute field

2016-10-07 Thread Yang
t; > On Friday, October 7, 2016 at 5:03:32 AM UTC-4, Yang wrote: >> >> OK, Thanks a lot! >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report I

[web2py] Re: validate_and_insert() doesn't work for compute field

2016-10-07 Thread Yang
OK, Thanks a lot! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-user

[web2py] Re: validate_and_insert() doesn't work for compute field

2016-10-04 Thread Yang
For example, I have a test.py in modules and in the file I write from pydal import DAL, Field dbt = DAL('sqlite:memory') dbt.define_table('test', Field('x', 'float'), Field('y', 'float', compute=lambda r: r['x'] * 2)) dbt.test.validate_and_insert(x=1) print(dbt.t

[web2py] Re: validate_and_insert() doesn't work for compute field

2016-10-03 Thread Yang
idate_and_insert(x=1) > > Out[5]: > > > In [6]: > dbt.test(1) > > Out[6]: > > > > > Anthony > > On Monday, October 3, 2016 at 1:24:46 AM UTC-4, Yang wrote: >> >> Hello, >> >> It seems that validate_and_insert() doesn't

[web2py] validate_and_insert() doesn't work for compute field

2016-10-02 Thread Yang
Hello, It seems that validate_and_insert() doesn't work for compute field. For example, db.define_table('test', Field('x', 'float'), Field('y', 'float', compute=lambda r: r['x'] * 2)) db.test.validate_and_insert(x=1) gives db.test.insert(x=1

[web2py] Re: Unit testing and faking authentication

2015-11-06 Thread Yang
Hello, is there a way to fake the user group and membership as well? Thanks! On Saturday, April 7, 2012 at 5:24:09 PM UTC+2, Anthony wrote: > > For @auth.requires_login() to pass, I think you just need auth.user to > exist (and not be None). If your layout includes auth.navbar(), I think the >

[web2py] Re: How to implement Gmail Authentication

2015-07-14 Thread Do-Yang Kim
:15:07 AM UTC-5, Massimo Di Pierro wrote: > > You have to run web2py from source and run > > pip install oath2 > > On Saturday, 11 July 2015 08:24:03 UTC-5, Do-Yang Kim wrote: >> >> Hi. I'm a newbie trying web2py. I get this error when I try above

[web2py] Re: How to implement Gmail Authentication

2015-07-11 Thread Do-Yang Kim
Hi. I'm a newbie trying web2py. I get this error when I try above code *Cannot import module 'applications.admin.modules.oauth2'* I'm assuming that I don't have oauth2 library set up in the module section. How can I fix this? On Thursday, April 9, 2015 at 7:30:46 AM UTC-5, piero crisci wrote

Re: [web2py] Re: storing more than 1 millions uploaded files

2015-03-09 Thread Yang
Dear All, I am facing the same problem for storing a large number of data files. My database backend is PostgreSQL. And I am using the default fs with separated folder selected. I would like to know if there is other choices of file system recommended for my case, besides buying Amazon S3 servi

[web2py] Re: Sending email from server

2014-11-18 Thread Yang
It was caused by selinux. soloved by enabling the httpd_can_sendmail. Thank you for all the help! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You re

[web2py] Re: Sending email from server

2014-11-14 Thread Yang
On Friday, November 14, 2014 12:37:19 AM UTC+1, Niphlod wrote: > > well, to be nerdy. > > import telnetlib > tn = telnetlib.Telnet(hostname, 25, 10) > > > or (even better ?!) > > import socket > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s.settimeout(2) > try: > s.connect(

[web2py] Re: Sending email from server

2014-11-12 Thread Yang
Tried but telnet is not installed should I ask my administrator to install it? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this mess

[web2py] Re: Sending email from server

2014-11-12 Thread Yang
Hello Leonel, thank you for your reply. Then how could I find the reason for the failure? I tried the way you suggested in this page: https://groups.google.com/forum/#!searchin/web2py/mail.settings.hostname/web2py/pZT38v_s5OI/9Og3cQefLkkJ. However, the code "server = smtplib.SMTP('mydomain', 2

[web2py] Sending email from server

2014-11-11 Thread Yang
Hello, I am running web2py on Apache server. I can't send email from the server. The mail.error shows 'permission denied'. Is this due to the Apache configuration? How could I fix it? Thanks! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web

[web2py] How to find the elements in a component using selenium

2014-10-22 Thread yang . chen
Hi, How could I find the elements in a component using selenium? In the html the component is shown like this: loading... Is there a method of selenium that can load the component, then the elements in the component can be located? Thanks! -- Resources: - http://web2py.com - http://web2py

[web2py] How to find elements in a component by selenium

2014-10-22 Thread yang . chen
Hi, How could I find the elements in a component using selenium? In the html the component is shown like this: loading... Is there a method of selenium that can load the component, then the elements in the component can be located? Thanks! -- Resources: - http://web2py.com - http://web2py