[web2py] Re: Extracting value from web2py rowobject when performing sum on a field

2015-07-17 Thread Rahul
Perfect! Thank you Massimo. Cheers! Rahul (Uses web2py to make life and work easier) -- 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] can grid record be displayed vertically?

2015-07-17 Thread Alex Glaros
can grid record be displayed vertically? E.g., db.define_table('Preferences', Field('prefer_weekly_digest','boolean'), Field('prefer_no_alerts','boolean'), Field('default_reply_to_friend_requests', 'string')) User sees their preferences in vertical format Weekly Digest ☐ Prefer n

[web2py] Re: can I do Field ( 'mont[4]', ... ) or list item as a variable name

2015-07-17 Thread JorgeH
yes something like that ;) thanks Massimo On Friday, July 17, 2015 at 3:13:56 AM UTC-5, Massimo Di Pierro wrote: > > Something like this? > > db.define_table('item', Field('name'),Field('value','double')) > > def index(): > c = lambda id: "c%s" % id > table = TABLE() > item = d

[web2py] Re: addremove; hg api change again

2015-07-17 Thread Dave S
On Friday, July 17, 2015 at 8:01:11 AM UTC-7, Massimo Di Pierro wrote: > > They are killing mercurial by changing the API over and over. > Mercurial's official API is the command line, and they make no promises about compatibility of any internal interface between versions. They say this over

[web2py] Re: Represent use wrong row id

2015-07-17 Thread Anthony
It's a bug: https://groups.google.com/forum/#!topic/web2py/oui2tBIvcoM On Friday, July 17, 2015 at 4:27:34 PM UTC-4, Alex Glaros wrote: > > does the problem persist if you use vars instead of args? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web

[web2py] Re: SQLFORM grid bug is demonstrated in the attached app

2015-07-17 Thread Anthony
For now, one workaround might be to do this right before defining the grid: db.place.mode.type = 'integer' In that case, because the grid won't think the field is a "reference" field, it will not attempt to cache the output of the "represent" function. Also, you probably don't see an "Add" butt

[web2py] Re: SQLFORM grid bug is demonstrated in the attached app

2015-07-17 Thread Anthony
You have found a bug, which I have submitted here: https://github.com/web2py/web2py/issues/1024 Thanks for putting this together. Anthony On Friday, July 17, 2015 at 1:53:36 PM UTC-4, icodk wrote: > > The attached app is a simple two tables app that demonstrates smart/grid > bug in represent

[web2py] Represent use wrong row id

2015-07-17 Thread Alex Glaros
does the problem persist if you use vars instead of args? -- 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 subscr

[web2py] Re: callback in A helper + input vars - how?

2015-07-17 Thread Dave S
On Friday, July 17, 2015 at 1:05:15 AM UTC-7, ermolaev...@gmail.com wrote: > > How by using A helper callback sen a data from inputs?? > > > {{=A('Search', callback=URL('list', vars={'search'}), > target='t', _class='button white-bgc')}} > > > IF do by _onclick=

[web2py] Re: What works, float type, decimal type, double or all/none of the above?

2015-07-17 Thread Dave S
On Thursday, July 16, 2015 at 10:11:16 PM UTC-7, greenpoise wrote: > > Well, if I comment out the sizes, everything works. I have tried using > double as my field type. It doesn't work either. As Alex said, the error you posted is a Foreign Key exception ... a reference to another table has

[web2py] Re: What works, float type, decimal type, double or all/none of the above?

2015-07-17 Thread Dave S
On Thursday, July 16, 2015 at 4:33:32 PM UTC-7, Alex wrote: > > > the error messages indicates a different error. A failed Foreign Key > constraint happens when you set an invalid id for a FK field. Check your > references, from the snippet you posted only color is a foreign key so > maybe thi

Re: [web2py] Re: Web2py is "Badly designed framework" and "Does not scale"

2015-07-17 Thread Richard Vézina
Massimo has done W3, and I think it should a per app to use a JS lib like angular of ractive... Should web2py-next becomes something like web2py-brython ( http://www.brython.info/)? Richard On Fri, Jul 17, 2015 at 12:26 PM, António Ramos wrote: > As AngularJS died to reborn in this rapidly cha

Re: [web2py] Re: Web2py is "Badly designed framework" and "Does not scale"

2015-07-17 Thread António Ramos
As AngularJS died to reborn in this rapidly changing web world, i think web2py should also born again. I see myself using web2py as a rest API, coding more and more with javascript and less with python and i dont like it! It feels so "UGLY" When will we have web2py with new "batteries" included

Re: [web2py] Re: module vs plugin

2015-07-17 Thread Fabiano Almeida
Thanks Vikash! 2015-07-15 14:15 GMT-03:00 Vikash Sharma : > Module defines grouping logic at one place, the way you want to design it. > Example, all customer database, order details, vendor details and > respective operation are organised & implemented separately. Read more > about cohesion and

[web2py] Re: addremove; hg api change again

2015-07-17 Thread Massimo Di Pierro
They are killing mercurial by changing the API over and over. On Friday, 17 July 2015 08:16:53 UTC-5, zenzero...@gmail.com wrote: > > Ciao, > > I want to use https://kallithea-scm.org/ as mercurial repository web > interface. > Everything works fine except one last step in web2py web interface.

[web2py] Re: form in load component must be process directly

2015-07-17 Thread 黄祥
my bad, i forgot to include the main actor. *views/default/index.html* {{extend 'layout.html'}} {{=LOAD('default', 'post.load', ajax = True, target = 'post') }} {{=LOAD('default', 'show.load', ajax = True, target = 'show') }} about flash, already tried response.flash and session.

[web2py] addremove; hg api change again

2015-07-17 Thread zenzeromod
Ciao, I want to use https://kallithea-scm.org/ as mercurial repository web interface. Everything works fine except one last step in web2py web interface. When I click on the "Versioning" web interface button I get the error: Versione web2py™ Version 2.11.2-stable+timestamp.2015.05.30.11.29.

[web2py] Re: Extracting value from web2py rowobject when performing sum on a field

2015-07-17 Thread Massimo Di Pierro
s = db.ordered_prod.subtotal.sum() row = db(db.ordered_prod.order_number==ord_num).select(s).first() print row[s] On Friday, 17 July 2015 07:58:31 UTC-5, Rahul wrote: > > How to extract the value from this query/row object - - ? > Total = > db(db.ordered_prod.order_number==ord_num).select(db.o

[web2py] Extracting value from web2py rowobject when performing sum on a field

2015-07-17 Thread Rahul
How to extract the value from this query/row object - - ? Total = db(db.ordered_prod.order_number==ord_num).select(db.ordered_prod.subtotal.sum()).first() I know this is silly and may have a simple answer but for me I get a weird response if I print Total . Like below - Cheers, Rahul -

Re: [web2py] Re: SAML2 Service Provider app in web2py?

2015-07-17 Thread Jose de Soto
Hi, I have been playing with pysaml2 and web2py, maybe this SP example helps: https://github.com/josedesoto/web2py-sp-example Regards, On Monday, 27 October 2014 08:09:07 UTC+1, Prasad Muley wrote: > > Hi Massimo, > >In which provider log should I look into? (service provider [web2py

Re: [web2py] Re: pysaml for web2py2.9.5

2015-07-17 Thread Jose de Soto
Hi, I have been playing with pysaml2 and web2py, maybe this SP example helps: https://github.com/josedesoto/web2py-sp-example Regards, On Tuesday, 14 October 2014 19:31:05 UTC+2, Prasad Muley wrote: > > Thanks for Mandar. > > On Tue, Oct 14, 2014 at 10:59 PM, Mandar Vaze > wrote: > >> >> https

[web2py] Re: SQLFORM.grid and buttons in custom update_form

2015-07-17 Thread Massimiliano
I found a way! :-D {{=grid.elements('.form_header')[0]}} On Friday, July 17, 2015 at 12:36:09 PM UTC+2, Massimiliano wrote: > > Hi, > > I'm trying to customize the grid in edit mode. > > Something like: > > {{if 'grid' in globals():}} > {{if grid.update_form:}} > {{form = gr

[web2py] SQLFORM.grid and buttons in custom update_form

2015-07-17 Thread Massimiliano
Hi, I'm trying to customize the grid in edit mode. Something like: {{if 'grid' in globals():}} {{if grid.update_form:}} {{form = grid.update_form}} {{=form.custom.begin}} {{=form.custom.submit}} {{=form.custom.end}} {{else:}} {{=grid}}

[web2py] Re: form in load component must be process directly

2015-07-17 Thread Massimo Di Pierro
session.flash should probably be response.flash since you are not redirecting. In response.js = "jQuery('#show').get(0).reload()" what is #show? You do not show a ... in your code. On Thursday, 16 July 2015 17:50:41 UTC-5, 黄祥 wrote: > > continue my testing in another discussion : > https://grou

[web2py] Re: can I do Field ( 'mont[4]', ... ) or list item as a variable name

2015-07-17 Thread Massimo Di Pierro
Something like this? db.define_table('item', Field('name'),Field('value','double')) def index(): c = lambda id: "c%s" % id table = TABLE() item = db(db.item).select(): for item in items: table.append(TR(LABEL(item.name),INPUT(_name=c(item.id),value=item.value

[web2py] Re: redirecting app to another server

2015-07-17 Thread Massimo Di Pierro
Mind that routes_in = [(, 'code->url')] redirects to the url with code. It does not redirect on error. For there is a routes_onerror. It is documented in the routes.examples.py On Thursday, 16 July 2015 16:47:52 UTC-5, ari wrote: > > Thank you very, very much. I've never thought that i can r

[web2py] Re: Another online store based in web2py+ractive+stripe

2015-07-17 Thread Walter Munguia
I should be able to see "My orders"? I have: > Not Authorized > Privilegios insuficientes El martes, 14 de julio de 2015, 11:44:29 (UTC-5), Massimo Di Pierro escribió: > > I made another simple online store: https://github.com/mdipierro/estore3 > > Can you help me test, suggest improvement,

[web2py] callback in A helper + input vars - how?

2015-07-17 Thread ermolaev . icreator
How by using A helper callback sen a data from inputs?? {{=A('Search', callback=URL('list', vars={'search'}), target='t', _class='button white-bgc')}} IF do by _onclick="ajax('list',['search], 't')" - how disable button and show "Working..." message in button?