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
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
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
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
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
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
>
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
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
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
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(
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
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
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
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
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
: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
16 matches
Mail list logo