[web2py] Re: returning values from custom form

2016-11-26 Thread Jim Russell
Marlysson, Thanks for the reply. I did figure out how to do it the web2py way. It was not particularly intuitive, but now that I understand it, it makes sense and is pretty powerful. form=SQLFORM.factory( Field('hostnames',"list:string",

Re: [web2py] Re: auth_hasmembership(["admin","supervisor","auditor"]) ?

2016-11-26 Thread Marlysson Silva
Try this: auth.has_membership(group_id, user_id, role) The doc are here: http://web2py.com/books/default/chapter/29/09/access-control#Authorization Em sexta-feira, 25 de novembro de 2016 13:30:22 UTC-3, Ramos escreveu: > > can i change auth.has_membership(role) to another user? > i need to

[web2py] Re: returning values from custom form

2016-11-26 Thread Marlysson Silva
I don't used the form.accepted but you could use to validate de submit the form and handle.. but basically it's Em sábado, 26 de novembro de 2016 20:20:58 UTC-3, Marlysson Silva escreveu: > > I created a other version for your code, I created a form html ( the hard > way ) and in the

[web2py] Re: returning values from custom form

2016-11-26 Thread Marlysson Silva
I created a other version for your code, I created a form html ( the hard way ) and in the controller get the post vars sent by form: The controller: def form(): host_names = ["google","facebook","amazon","localhost"] marcados = request.post_vars["host"] return

[web2py] Re: returning values from custom form

2016-11-26 Thread Marlysson Silva
I created a other version for your code, I created a form html ( the hard way ) and in the controller get the post vars sent by form: The controller: def form(): host_names = ["google","facebook","amazon","localhost"] marcados = request.post_vars return

[web2py] REST especification - Documentation RESTFul services in web2py

2016-11-26 Thread Marlysson Silva
In web2py's documentation about RESTFul services it shows how retrieve resources by people , example: http://127.0.0.1/myapp/default/api/persons.json And after it shown how retrieve a unique person : http://127.0.0.1/myapp/default/api/person/1.json But in REST especification ( or at least by

[web2py] Re: Do conditionals short circuit for DAL?

2016-11-26 Thread Brian M
Well even if you're writing the query using the DAL the actual data processing is being done by the database itself so that's where the "short circuiting" would need to happen and is dependent on the database's query optimization. Try running a SQL version of the query directly against the DB

[web2py] Re: Scheduler and Serial Port Problems

2016-11-26 Thread Richard Brown
I've now had chance to do some more investigation and research since my last posting and found the following. The reason that saving files in Web2py causes RTS to be asserted and makes my application work is that my file 'control.py', which contains all my serial functions, includes the lines:

Re: [web2py] Re: How to add an input field in SQLFORM.grid??

2016-11-26 Thread Anthony
On Friday, November 25, 2016 at 11:11:41 PM UTC-5, Paul Ellis wrote: > > Hi, > I am trying to do the same thing as the OP. Add a quantity input field to > a grid and then use Callback to work with the product_id and quantity. I > just don't seem to be able to pass the quantity to the callback

[web2py] Re: how to make Query, without redundance

2016-11-26 Thread Anthony
Not sure I understand exactly, but if you want to know whether tableA is referenced by any other tables, you can do something like: tableA_referenced_by = set(field._table for field in db.tableA. _referenced_by) That will give you a set of any tables (the actual DAL Table objects) that have