[web2py] Re: Email auth settings

2015-04-28 Thread Anthony
Most of the text used by Auth can be found in auth.messages (which is documented here http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages). In this case, it is auth.messages.email_sent. Note, that message is used in several contexts, so if you are going to

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Richard Vézina
Interresting... But for signing a DB record really?? On Mon, Apr 27, 2015 at 11:48 PM, Dave S snidely@gmail.com wrote: On Monday, April 27, 2015 at 4:56:47 PM UTC-7, Richard wrote: Hello, I would like to know if anyone had developed any kind of electronic signature involving some

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Richard Vézina
You are right Simone and I am glad to have your input. But it prevent at least that admin of the DB can change data without the user to know and the review process can't be repudiate... Richard On Tue, Apr 28, 2015 at 3:57 PM, Niphlod niph...@gmail.com wrote: not to discredit the efforts, but

Re: [web2py] how to passing query or db set through url securily

2015-04-28 Thread Richard Vézina
doh! Can we do this kind of query with SQLFORM.grid search tool : q = ((db.table.field == 'something' | db.table.field != None) db.table.other_field == something) ?? Richard On Tue, Apr 28, 2015 at 2:58 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: I maybe better constructing my

Re: [web2py] Two SQLFORMs side by side?

2015-04-28 Thread LoveWeb2py
I'd love to see it, Richard! I'm banging my head against the wall with this other method. On Tuesday, April 28, 2015 at 6:58:25 PM UTC-4, Richard wrote: My own mix of SELECT_OR_ADD_OPTION() widget and web2py SQLFORM.widget.autocomplete... As wrote above I can share the code here...

[web2py] Re: Form to get a value and process

2015-04-28 Thread Dave S
On Tuesday, April 28, 2015 at 6:01:04 PM UTC-7, Aydin S wrote: This is probably very simple, sorry in advance! I have a form defined in a model file: db.define_table('table1', Field('X', 'integer')) I have a controller that is also defined as: def index(): form = SQLFORM(db.X)

[web2py] Re: Form to get a value and process

2015-04-28 Thread Aydin S
No, the value of the form gets processed every time the scheduler runs. On Tuesday, 28 April 2015 21:07:42 UTC-4, Dave S wrote: On Tuesday, April 28, 2015 at 6:01:04 PM UTC-7, Aydin S wrote: This is probably very simple, sorry in advance! I have a form defined in a model file:

[web2py] Form to get a value and process

2015-04-28 Thread Aydin S
This is probably very simple, sorry in advance! I have a form defined in a model file: db.define_table('table1', Field('X', 'integer')) I have a controller that is also defined as: def index(): form = SQLFORM(db.X) return dict(form=form) In my index view file I have: h2Input form/h2

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Derek
that would do it... but only the user could check the validity. On Tuesday, April 28, 2015 at 3:19:03 PM UTC-7, Niphlod wrote: I meant an hmac with the user supplying the key, of course. That puts you on the safe-side of db admin tampering. On Tuesday, April 28, 2015 at 11:32:47 PM UTC+2,

[web2py] Re: How to capture auth_user.id during registration

2015-04-28 Thread Alex Glaros
Anthony, now it creates a duplicate auth_user record and still gives the value None This is not important so I will just create a work-around. Thanks, Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: print html page view on dot matrix printer

2015-04-28 Thread 黄祥
thanks derek for your suggestion, i'll try it first (use css font-family fixed width like courier, monoscape, etc), since it's the easiest. during googling i've found another method that work in another programming language 1. use activex to handle dot matrix printer (microsoft) 2. create plain

Re: [web2py] Two SQLFORMs side by side?

2015-04-28 Thread Richard Vézina
My own mix of SELECT_OR_ADD_OPTION() widget and web2py SQLFORM.widget.autocomplete... As wrote above I can share the code here... Richard On Tue, Apr 28, 2015 at 5:06 PM, LoveWeb2py atayloru...@gmail.com wrote: What do you use as a replacement? On Tuesday, April 28, 2015 at 4:59:32 PM

[web2py] Re: Form to get a value and process

2015-04-28 Thread Aydin S
It looks like the scheduler which is a model file does not see variable X in the database! On Tuesday, 28 April 2015 21:19:14 UTC-4, Aydin S wrote: No, the value of the form gets processed every time the scheduler runs. On Tuesday, 28 April 2015 21:07:42 UTC-4, Dave S wrote: On Tuesday,

[web2py] Re: Form to get a value and process

2015-04-28 Thread Dave S
On Tuesday, April 28, 2015 at 6:35:31 PM UTC-7, Aydin S wrote: It looks like the scheduler which is a model file does not see variable X in the database! I don't think the value will be entered in the database until you process the form. Using the value in a process run by the scheduler

[web2py] how to passing query or db set through url securily

2015-04-28 Thread Richard
Hello, I need to pass a db_set to a widget that is used into an IS_IN_DB() validator. This as to be done in order to the widget which is a custom autocomplet widget using bootstrap typeahead can make the correct query with ajax call to a returning json function which feed the widget with

Re: [web2py] how to passing query or db set through url securily

2015-04-28 Thread Richard Vézina
I guess the best option would be to do the same as SQLFORM.grid search?? On Tue, Apr 28, 2015 at 12:10 PM, Richard ml.richard.vez...@gmail.com wrote: Hello, I need to pass a db_set to a widget that is used into an IS_IN_DB() validator. This as to be done in order to the widget which is a

Re: [web2py] Two SQLFORMs side by side?

2015-04-28 Thread LoveWeb2py
Richard, This is working great. http://linuxapuntes.blogspot.com.ar/2013/03/plugin-modal-bootstrap-web2py.html I currently use it like this: def my_controller(): from modalplugins Import Modal field = db.mytable.field modal = Modal(field, ' Add', 'Add area','Area')

Re: [web2py] Two SQLFORMs side by side?

2015-04-28 Thread Richard Vézina
There is different issue when embed for into a bootstrap 2.3.2 (at least)... One that I found were that form tag get ripped off... The other depend of the way the modal form compoenent is included into the main form... Depending how the widget is write the extra are embed beside the original input

Re: [web2py] how to passing query or db set through url securily

2015-04-28 Thread Richard Vézina
How to extract the operator of the query in familiar == or = db_set.query.second.op return adapter bound operator... Richard On Tue, Apr 28, 2015 at 12:15 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: I guess the best option would be to do the same as SQLFORM.grid search?? On Tue,

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Niphlod
The assumption was indeed if the app is the only thing accessing the database. Not trusting DB administrators is kinda weird as a requirement, but if that's your scenario, go for it. I'm a bit lost on the general idea for the implementation is the user required to input some kind of

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Niphlod
at this point, why do you even care of using certs ? you need signing, not encryption AND you're not hooked up to a CA .just use an hmac ! On Tuesday, April 28, 2015 at 10:31:41 PM UTC+2, Richard wrote: If the private key is protect by password only the user can use no? I am far

Re: [web2py] Two SQLFORMs side by side?

2015-04-28 Thread LoveWeb2py
Thank you, Richard. Where do I put $(#{modal_id}).appendTo( body); Could I just put that in the HTML file? Something like... script $(#{modal_id}).appendTo( body); /script I tried hardcoding the div_id of my modal into your code, but it didn't work. The database doesn't update properly with

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Derek
I'd have to agree, put the user account (email, username, whatever) and the fields all together, calculate hmac on that, and store it. If someone changes the data, the hmac won't match and you'll see it's not valid. Of course, an admin could just go in and modify the hmac signature after

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Richard Vézina
If the private key is protect by password only the user can use no? I am far from an expert in encryption... I was thinking of sotring gpg pub and private key in auth_user field for each respectively. Then invoque the user to input password when he want to sign a record after_validation and

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Richard Vézina
https://www.gnupg.org/gph/en/manual/c481.html#Protecting your private key Yeah could be kind of weak to store the private key, since it would be only protect by passphrase but it maybe enough for my need... I need further reading... Richard On Tue, Apr 28, 2015 at 4:31 PM, Richard Vézina

Re: [web2py] Two SQLFORMs side by side?

2015-04-28 Thread LoveWeb2py
What do you use as a replacement? On Tuesday, April 28, 2015 at 4:59:32 PM UTC-4, Richard wrote: in view in script tag is a good place for start... just make sure you have the rigth id for you modal main div... In my case modal_id was coming from an .fromat(modal_id='id')... But I don't

Re: [web2py] Two SQLFORMs side by side?

2015-04-28 Thread LoveWeb2py
This is what I'm using in my layout: $(function() { $(td.w2p_fc).each(function (){ var comment = $(this).html(); if (comment){ $(this).html('divi class=icon info icon-info-sign/i/div'); $(this).children('div').attr('title',comment); $(this).children('div').tooltip({

Re: [web2py] Two SQLFORMs side by side?

2015-04-28 Thread Richard Vézina
in view in script tag is a good place for start... just make sure you have the rigth id for you modal main div... In my case modal_id was coming from an .fromat(modal_id='id')... But I don't recall the exact way this tutorial was doing and I was just exposing to 2 generals reasons why form into

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Niphlod
I meant an hmac with the user supplying the key, of course. That puts you on the safe-side of db admin tampering. On Tuesday, April 28, 2015 at 11:32:47 PM UTC+2, Derek wrote: I'd have to agree, put the user account (email, username, whatever) and the fields all together, calculate hmac on

[web2py] Re: Caching Logic in web2py

2015-04-28 Thread Leonel Câmara
This one: A. Does the cached object get updated: The cached object is updated immediately because it's the same object. Cache ram does not clone it. Notice that the behaviour will be different if you're using cache disk. Do know that doing this is a very bad idea, as you will run into all

[web2py] familiar '==' operator from db_set.query.first.op

2015-04-28 Thread Richard
Hello, Si there a way to get back to familiar == or != form db_set.query.first.op?? Thanks Richard -- 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) ---

Re: [web2py] how to passing query or db set through url securily

2015-04-28 Thread Richard Vézina
I maybe better constructing my db() set like so instead of deconstruct it to get the query component : from gluon.dal import smart_query keywords = \ 'table1.f1 = True and ' \ 'table1.f2 != {0}'.format( db(db.ref_table.f1 =='Annulé - Void'

Re: [web2py] familiar '==' operator from db_set.query.first.op

2015-04-28 Thread Richard Vézina
Solved here : https://groups.google.com/d/msg/web2py/zUdFSxymCqg/Avr61RLSq_kJ On Tue, Apr 28, 2015 at 1:50 PM, Richard ml.richard.vez...@gmail.com wrote: Hello, Si there a way to get back to familiar == or != form db_set.query.first.op?? Thanks Richard -- Resources: -

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Dave S
On Tuesday, April 28, 2015 at 6:46:01 AM UTC-7, Richard wrote: Interresting... But for signing a DB record really?? Ah, now you're getting more specific. You're trying to track who made a change (audit function), or to validate that the user is authorized to make the change, or to

[web2py] socket.io to connect to tornado websocket

2015-04-28 Thread António Ramos
hello i have an app with tornado websockets in the back my webpage has this code web2py_websocket('ws://serverip:12200/realtime/mygroup1') it just works !! now i need to connect to my tornado websocket from a nodejs server using socket.io this line of code does not connect var socket =

[web2py] Re: Combine IS_IN_DB and IS_NOT_IN_DB

2015-04-28 Thread kecajkecaj123
HI, I must have skipped _and, it's what i was looking for. But also started wondering about second example, but it gives me empty results on drop-down. When i remove ~ it works as expected returning IPs that have been already assigned. db.server.ipaddress_id.requires =

Re: [web2py] unicode error with postgre on 2.10.3 (with sample app)

2015-04-28 Thread bodobammel
which postgresql Version? PSQL 9.3.6 @ Ubuntu 14.04.2 LTS In the meantime, I played around with pgadmin a little bit: 1) Using pgadmin I can create records containing 'ἀγοραζε' (the sample above) or German Umlaute ä, ö, ü, so it's definetly no database problem. 2) Going to Appadmin

[web2py] Caching Logic in web2py

2015-04-28 Thread Chris Modzelewski
Hi Everyone, I have some questions about how caching works in web2py. I'm not interested at this point in understanding how to cache entire views or anything like that - in this case, I'm interested in understanding the principles behind how web2py implements caching: Let's say that I have a

[web2py] Show tables

2015-04-28 Thread KevC
Hi! I want to show two or more tables. Can I use SQLForm.grid? If so, Can you give me an example? Please. Or, Can I do it other way? Best regards. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: Issue with lookup foreign key / format statement in 2.10.3

2015-04-28 Thread Hilton Shumway
On Monday, April 20, 2015 at 4:30:03 PM UTC-6, Jim S wrote: I'm running 2.10.4 beta. Grabbed it from github this morning. On Mon, Apr 20, 2015 at 5:10 PM, Dave S snide...@gmail.com javascript: wrote: On Monday, April 20, 2015 at 10:02:44 AM UTC-7, Jim S wrote: Can someone tell me if

[web2py] Re: Best way to load password at startup.

2015-04-28 Thread Gary Cowell
For one of my apps, I added extra fields to auth to hold some Amazon AWS credentials for the logged in user. This means that I can access the required API keys when logged in , but because it's part of the database, it doesn't get committed to source control. For accessing external database

[web2py] SQLFORM calling a MySQL database returns Not authorized Insufficient privileges error

2015-04-28 Thread TYRANISTAR
Hello, I've made an application where I call a MySQL database and give the user the option of choosing the columns of the database to appear. Nevertheless when I try to click the link I get the Not authorized Insufficient privileges error without even having the chance to login. I used

[web2py] Problem using routes_in to convert path elements to vars

2015-04-28 Thread Rich Hogg
I've been trying to use a pattern-based incoming route to strip off some elements of the path and pass them to the controller as vars, e.g. routes_in = ( ('/svn/(?Psvn_url.*)', '/svnweb/default/index?svn_url=\gsvn_url'), ) It looks to me like regex_filter_in is doing what I would expect

[web2py] class 'sqlite3.integrityerror' foreign key constraint failed

2015-04-28 Thread RUTMARYS TRUJILLO
Hola tengo un problema, cada vez que introduzco los registros en el formulario de la tabla proyecto sale el error class 'sqlite3.integrityerror' foreign key constraint failed no se que hacer... por favor agradecería su ayuda este es el modelo: db.define_table(ente,

[web2py] Re: Pydal ilike search inside a list of strings?

2015-04-28 Thread Tom Stratton
For me, with the postgres adapter, the contains method is only returning information when one of the items in the list is an exact match (case insensitive) for the item I search for. so if the list is ['John Doe', 'Michael Smith', 'Karen Jones', 'Anne Baker'] contains('Michael Smith') returns

[web2py] Re: Show tables

2015-04-28 Thread Niphlod
grid can show a join, that is data coming from different table, but condensed into a single resultset. if you want a page with more than a grid, each holding a simple table, you should use components. On Tuesday, April 28, 2015 at 9:26:23 PM UTC+2, KevC wrote: Hi! I want to show two or more

Re: [web2py] Re: Issue with lookup foreign key / format statement in 2.10.3

2015-04-28 Thread Jim S
My problem turned out to be that I didn't have the latest pydal. I'd installed it separately from web2py and when I updated web2py, pydal didn't automatically update. I removed my separate pydal and then installed the latest web2py (using git) and then everything worked for me. On Tuesday,

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Richard Vézina
Thanks for answer... I want an electronic signature for db records which will be privatekey sign by the user when he do some operation (let say review the record data). The signature will be done over an serialized version of the record once form accepted and before the record get insert. This

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Alex Glaros
this is probably not what you're looking for, especially from a newbie like me, but am writing authorizing feature where any number of people can be selected to authorize any thing. Example, the organization wants legal department, exec, and public affairs department all to authorize a new web

[web2py] Any problem in list:reference in 2.10 ?

2015-04-28 Thread Ariya Owam-aram
Hi Everyone, I just upgrade to 2.10.4 and found error message when using filed list:reference. APP : welcome DB db.define_table('parent', Field('name')) db.define_table('student', Field('name'), Field('parent', 'list:reference parent')) in APPADMIN - from parent table insert : father,

[web2py] UnicodeEncodeError and request.vars

2015-04-28 Thread Louis Amon
I'm raising what seems to be an old issue with web2py : sending forms with web2py raises exceptions when using accentuated characters. Given that request.vars can be virtually anything on a production server, what is the best practice here ? Should I force request.vars keys values to be

Re: [web2py] unicode error with postgre on 2.10.3 (with sample app)

2015-04-28 Thread Michele Comitini
One more check... is the encoding of the database UTF-8? you can check with psql -l 2015-04-27 19:01 GMT+02:00 bodobam...@gmail.com: which postgresql Version? PSQL 9.3.6 @ Ubuntu 14.04.2 LTS In the meantime, I played around with pgadmin a little bit: 1) Using pgadmin I can create

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-28 Thread Niphlod
not to discredit the efforts, but if you're not going to relinquish the computed signature to the user, what good does it make over auditing changes through, e.g., record_versioning ? If the database is only accessed within your app, your app (and/or your server) is responsibile of NOT

[web2py] Re: Email auth settings

2015-04-28 Thread Gael Princivalle
Thanks Anthony, it works perfectly. Another question. With: auth.settings.registration_requires_verification = True An email will be sent for verification, but the flash message is not so clear Email sent. Is there's a way to customize this flash message? Il giorno lunedì 27 aprile 2015