[web2py] Re: save the original value of one field in another table field

2018-06-19 Thread Anthony
This is generally not good database design. What are you really trying to do? Would it make more sense for mytable2 to reference mytable? Anthony On Tuesday, June 19, 2018 at 9:09:42 PM UTC-4, Ayron Rangel wrote: > > How can i save the value of one field in another table field?? > > db.define_ta

[web2py] Re: save the original value of one field in another table field

2018-06-19 Thread 黄祥
perhaps you can use database callbacks or form validation *ref:* http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#callbacks-on-record-insert--delete-and-update http://web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation best regards, stifan -- Reso

[web2py] redis in 2.16.1

2018-06-19 Thread 黄祥
it seems session with redis not work in 2.16.1 *e.g. create web2py from scratch name redis* *models/db.py* from gluon.contrib.redis_utils import RConn from gluon.contrib.redis_cache import RedisCache from gluon.contrib.redis_session import RedisSession rconn = RConn('localhost', 6379) cache.redis =

[web2py] save the original value of one field in another table field

2018-06-19 Thread Ayron Rangel
How can i save the value of one field in another table field?? db.define_table('mytable', Field('n1', 'integer', requires=IS_NOT_EMPTY()) ) db.define_table('mytable2', Field('n1', 'integer', requires=IS_NOT_EMPTY()) -> I want this field iguals the field (n1) on mytable. ) -- Re

[web2py] Re: managing latin characters

2018-06-19 Thread Anthony
On Tuesday, June 19, 2018 at 3:00:03 PM UTC-4, Andrea Fae' wrote: > > Thank you Leonel, but when I try to insert to db for example this name > "Donà" in the username field (table auth_user) the system tells me that is > not possible...So, what to do? Convert "Donà" in "Dona" without accent? > Wh

[web2py] Re: field username in auth_user

2018-06-19 Thread Anthony
By default it must match the following regular expression: '[\w\.\-]+' So, no spaces. I suppose you could override the default validator and allow spaces, but I'm not sure if that has any consequences for uses of the username elsewhere in the Auth system. Anthony On Tuesday, June 19, 2018 at

[web2py] Re: field username in auth_user

2018-06-19 Thread Dave S
On Tuesday, June 19, 2018 at 12:20:59 PM UTC-7, Andrea Fae' wrote: > > What kind of characters can we use in this field? > Can I use space character in this field? I think no. > thank you > You might try a "non-breaking space". In unicode, that U+00A0 http://www.fileformat.info/info/unicode/cha

[web2py] Re: managing latin characters

2018-06-19 Thread Dave S
On Tuesday, June 19, 2018 at 12:00:03 PM UTC-7, Andrea Fae' wrote: > > Thank you Leonel, but when I try to insert to db for example this name > "Donà" in the username field (table auth_user) the system tells me that is > not possible...So, what to do? Convert "Donà" in "Dona" without accent? >

[web2py] field username in auth_user

2018-06-19 Thread Andrea Fae'
What kind of characters can we use in this field? Can I use space character in this field? I think no. thank you -- 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

[web2py] Re: managing latin characters

2018-06-19 Thread Andrea Fae'
Thank you Leonel, but when I try to insert to db for example this name "Donà" in the username field (table auth_user) the system tells me that is not possible...So, what to do? Convert "Donà" in "Dona" without accent? Which characters can I use in the username field? In the book there is only d

[web2py] Re: Salesforce access code works standalone but fails from within web2py app

2018-06-19 Thread 'jim kaubisch' via web2py-users
Solved... Ultimately an out-of-date simple_salesforce, but complicated by the fact that my pip v9.0.1 attempt to upgrade simple_salesforce (and even pip itself) also failed with a TLSV1 failure. Stumbled upon this link - which had an answer that worked for me to get out of this apparent inf

[web2py] Re: Clarification please on autocomplete widget...

2018-06-19 Thread Anthony
It sounds like you want the reference field version of autocomplete. What is your exact model code and the widget code you tried? Anthony On Tuesday, June 19, 2018 at 11:24:07 AM UTC-4, jim kaubisch wrote: > > Thanks, Anthony. > > because there may be MANY values in the field, what I would actua

[web2py] Required field label

2018-06-19 Thread Tu Duong
Hi, what is the best way to add red * (or any indication that the field is required for user) in the label of the required field? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

[web2py] Salesforce access code works standalone but fails from within web2py app

2018-06-19 Thread 'jim kaubisch' via web2py-users
HI, One of the apps I’m writing involves interaction with Salesforce. I’ve written a context manager to implement access to our Salesforce account (using “simple_salesforce” as the access mechanism). When run as a standalone program access and data retrieval work fine, but imported int

[web2py] Re: Clarification please on autocomplete widget...

2018-06-19 Thread 'jim kaubisch' via web2py-users
Thanks, Anthony. because there may be MANY values in the field, what I would actually be perfectly happy with is a list as you describe it, but one that is the result of a db query, e.g. a list of names of all schools whose "Field('district_id' , 'reference districts', label=T('District

[web2py] Re: Clarification please on autocomplete widget...

2018-06-19 Thread Anthony
No, as the example in the book shows, by "list", it just means a list generated from the contents of a single field in a database table (in contrast to the reference field option, which submits integer ID values from a reference field but searches and displays the corresponding values from an a