[web2py] How can I print the result of query in JQuery

2018-08-31 Thread Ayron Rangel
Hello, How can I print the result of on query in JQuery? I want to change the name for the result of my query... Follow the code: win.TestData = [ [ [ {"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1, "displaySeed": "D1", "score" : 47 },

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

2018-06-20 Thread Ayron Rangel
Anthony, What I want would be to insert the same value(integer) from one Field to another Field on other table. Ex.: db.define_table('product', Field('name', 'string'), Field('qtd', 'integer', default=1, readable=False, writable=False), Field('stock_id', db.stock) )

[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. ) --

[web2py] Re: CHANGE THE LOGIN FLASH MESSAGE

2018-06-18 Thread Ayron Rangel
Anthony, Will I use the auth.settings.login in the controller? or in the view?? -- 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

[web2py] CHANGE THE LOGIN FLASH MESSAGE

2018-06-18 Thread Ayron Rangel
Guys, How do I change the response.flash message when I log in? Every time when I'm login, appears just "Logged In", i want to change this message to Welcome ' username'. Regards, Ayron Rangel -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] Re: Select ALL products

2018-06-18 Thread Ayron Rangel
Massime, I would like it to show on the "modal" the list of all models products equal to the table row. Ex.: I have in my first row of the table all products with the model A (in query i'm using group by = 'db(query).select(db.products.ALL, db.stock.ALL,count,somar,

[web2py] Select ALL products

2018-06-04 Thread Ayron Rangel
Guys, me again o.O How can I select all products according to the same model? I'm using modal to show the products (When I click on Magnifying Glass) Follow my code: Controller: def table_stock(): somar = db.products.unit_price.sum() count = db.products.id.count() query =

[web2py] USING MODAL

2018-06-04 Thread Ayron Rangel
Guys!! I need help!! How can I use "MODAL" to edit a value?? Follow my code: -controller: def table_ufs(): form = SQLFORM(db.uf) if form.process().accepted: session.flash = 'REGISTRATION SAVED SUCCESSFULLY' redirect(URL('table_ufs')) elif form.errors:

[web2py] Re: CUSTOM PRINT LIST:REFERENCE

2018-05-22 Thread Ayron Rangel
> > Anthony, > It's possible to convert to str() How can i do this?? {for x in item.render():}} {{=x.item}} {{pass}} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: CUSTOM PRINT LIST:REFERENCE

2018-05-22 Thread Ayron Rangel
Anthony, its works!!! -- 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] CUSTOM PRINT LIST:REFERENCE

2018-05-22 Thread Ayron Rangel
Guys, How can i custom print the list:reference ??? I try to print the list reference and appears like this: [9L, 10L] not Item 9 - Pencil ; Item 10 - erase In my case i have this: model: Field('item', 'list:reference itens') view: {{for row in results:}} {{=row.item}} -- Resources: -

[web2py] Re: Reuse query

2018-05-22 Thread Ayron Rangel
> > Stifan, > It worked, but not how I like it. Appears all products with different models in my view!!! To understand better. I have a table that list (results) for all products using group by (i'm using count). Like this:

[web2py] Reuse query

2018-05-22 Thread Ayron Rangel
Guys, How can i reuse the results of this query to another?? I have to queries: -results = db(db.stock.id == (db.products.stock)).select(db.products.ALL, db.stock.ALL,count, groupby=db.products.model) -view = db(db.stock.id == (db.products.stock)).select(db.products.ALL) I want to list(view)

Re: [web2py] TABLE FOR LIST:REFERENCE

2018-05-17 Thread Ayron Rangel
> This is my controller: > def new_product_input(): form = SQLFORM(db.product_input) if form.process().accepted: session.flash = 'Registration Saved Successfully' redirect(URL('product_input')) elif form.errors: response.flash = 'Attention: errors in the form.' return dict(form=form) my

Re: [web2py] TABLE FOR LIST:REFERENCE

2018-05-16 Thread Ayron Rangel
I Just used {{=form}} um mundo view!! Could you know to do that in custom?? Em qua, 16 de mai de 2018 12:19, António Ramos <ramstei...@gmail.com> escreveu: > What code are u using in your view to display the record? > > 2018-05-16 15:17 GMT+01:00 Ayron Rangel <ayron

[web2py] TABLE FOR LIST:REFERENCE

2018-05-16 Thread Ayron Rangel
Guys, How can I display the list:reference like a table? Ex.: I have this in db.py: "Field('product', 'list:reference products', notnull=True, label='Products')" in my view appears, like this:

[web2py] Re: VIEW NAME NOT ID

2018-04-30 Thread Ayron Rangel
> > Sorry, man! > How can I put on my way?? based on my code!! -- 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

[web2py] VIEW NAME NOT ID

2018-04-30 Thread Ayron Rangel
I have this: db.py: db.define_table('product_input', Field('product', db.product, notnull=True), Field('total_price','decimal(7,2)', readable=False,writable=False), Field('amount', 'integer', readable=False,writable=False), Field('supplier', db.supplier, notnull=True),

[web2py] PRINT LIST:REFERENCE

2018-04-30 Thread Ayron Rangel
Hi have this structure: db.py: #DEFINE PRODUCT INPUT db.define_table('product_input', Field('product', db.product, notnull=True), Field('total_price','decimal(7,2)', readable=False,writable=False), Field('amount', 'integer', readable=False,writable=False), Field('supplier',

[web2py] Re: HOW CAN I PRINT THIS

2018-04-24 Thread Ayron Rangel
Like this: {{for row in results:}} {{=row.id}} {{=row.product}} appears erros Em terça-feira, 24 de abril de 2018 16:59:11 UTC-3, Dave S escreveu: > > > > On Tuesday, April 24, 2018 at 6:49:57 AM UTC-7, Ayron Rangel wrote: >> >> Guys, >> >> How c

[web2py] HOW CAN I PRINT THIS

2018-04-24 Thread Ayron Rangel
Guys, How can i print this in HTML (CUSTOM) DAL : def stock (): sum = db.input_inventory.input_price.sum() count = db.input_inventory.product.count() results = db(db.input_inventory).select(db.input_inventory.product, count, sum, groupby = db.product) return locals() HMTL: {{row in

[web2py] Problem: Sum total price and total quantity of a product

2018-04-20 Thread Ayron Rangel
I am developing an Inventory Control and am having difficulty calculating the sum of the values ​​of a given product type and calculating the quantity of products with the same model -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py