[web2py] Re: How to create object of 'Storage' In class I created?

2014-07-10 Thread Niphlod
from gluon.storage import Storage mydict = dict(a=1,b=1) print mydict['a'] print mydict.a --> exception mydict = Storage(mydict) print mydict['a'] print mydict.a --> no exception On Thursday, July 10, 2014 4:23:41 AM UTC+2, Omri Levy wrote: > > Hi , > > I have created a class (that i put in m

[web2py] Re: Broken ajax links giving "unrecognized expression" error

2014-07-10 Thread Niphlod
do this come up in the browser's console ? if yes, what line do they target of what js file ? On Wednesday, July 9, 2014 11:57:39 PM UTC+2, Ian W. Scott wrote: > > Some ajax links that used to work have just broken and I'm not sure where > to start in debugging. The links target a load component

[web2py] Re: DAL Bug?

2014-07-10 Thread Leonel Câmara
But lyn2pi that's what the delete is doing (marking them inactive), my only peeve is with the count returned from the delete which in my opinion should be the number of rows marked inactive. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/we

[web2py] Re: Broken ajax links in component

2014-07-10 Thread Leonel Câmara
Have you tried updating jquery 1.11 this seems like a known jquery 1.9 bug. -- 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 beca

[web2py] Re: Broken ajax links giving "unrecognized expression" error

2014-07-10 Thread Ian W. Scott
Yes, it's in the browser's console, and it's targeting jquery.js line 3. On Thursday, July 10, 2014 6:02:18 AM UTC-4, Niphlod wrote: > > do this come up in the browser's console ? if yes, what line do they > target of what js file ? > > On Wednesday, July 9, 2014 11:57:39 PM UTC+2, Ian W. Scott w

[web2py] Re: Broken ajax links in component

2014-07-10 Thread Ian W. Scott
Sorry for the double post of this question. My original post took several hours to appear, so I thought it hadn't gone through. On Wednesday, July 9, 2014 3:31:33 PM UTC-4, Ian W. Scott wrote: > > I'm in the process of upgrading a site from bs2 to bs3 and I've run into > an unexpected (and possi

[web2py] Re: Broken ajax links in component

2014-07-10 Thread Ian W. Scott
I'm not running jquery 1.9. It's version 1.10.2. But I can try 1.11 and see what happens. On Thursday, July 10, 2014 6:32:27 AM UTC-4, Leonel Câmara wrote: > > Have you tried updating jquery to 1.11 this seems like a known jquery 1.9 > bug. > -- Resources: - http://web2py.com - http://web2py.c

[web2py] Re: show_if belongs condition.second is set()

2014-07-10 Thread villas
Just found this bug too, but coincidentally now see that a fix was committed only this morning in trunk. I updated and now all OK. Thanks to sunny and others for reporting and fixing! On Tuesday, 3 June 2014 15:41:13 UTC+1, sunny wrote: > > The following show_if condition gives me an "Not

Re: [web2py] Re: Virtual Fields in auth_user?

2014-07-10 Thread Fabiano Almeida
Hi Massimo, I tried this: auth.settings.extra_fields['auth_user']= [ ... Field('dept_grid', compute = lambda row: Departamento[row['departamento_id']].nome if row['departamento_id'] else None, label = 'Departamento'), Field.Virtual('dept_name', lambda row: Departamento[row

[web2py] Re: Broken ajax links giving "unrecognized expression" error

2014-07-10 Thread Niphlod
can you pack a minimal app to reproduce the issue ? On Thursday, July 10, 2014 12:54:03 PM UTC+2, Ian W. Scott wrote: > > Yes, it's in the browser's console, and it's targeting jquery.js line 3. > > On Thursday, July 10, 2014 6:02:18 AM UTC-4, Niphlod wrote: >> >> do this come up in the browser's

[web2py] Re: Broken ajax links giving "unrecognized expression" error

2014-07-10 Thread Ian W. Scott
It'll take a bit of time, but I'll see what I can do. On Thursday, July 10, 2014 8:37:31 AM UTC-4, Niphlod wrote: > > can you pack a minimal app to reproduce the issue ? > > On Thursday, July 10, 2014 12:54:03 PM UTC+2, Ian W. Scott wrote: >> >> Yes, it's in the browser's console, and it's targeti

Re: [web2py] Recompute all instances of a computed field

2014-07-10 Thread Johann Spies
Try: #!/usr/bin/python # -*- coding: utf-8 -*- rows = db(db.urlop.id > 0).select(db.urlop.ilosc_dni,db.termin_od, db.termin_do) howmany = len(rows) busy_with = 0 for row in rows: busywith += 1 print 'busy with %d of %d' % (busywith, howmany) On 19 June 2014 18:29, Tomasz Sokołowski

Re: [web2py] Recompute all instances of a computed field

2014-07-10 Thread Johann Spies
Sorry, I sent it before finishing #!/usr/bin/python # -*- coding: utf-8 -*- rows = db(db.urlop.id > 0).select(db.urlop.ilosc_dni, db.termin_od, db.termin_do) howmany = len(rows) busy_with = 0 for row in rows: busywith += 1 print 'busy with %d of %d' % (busywith, howmany) row.update_

Re: [web2py] Recompute all instances of a computed field

2014-07-10 Thread Fabiano Almeida
Hi Johann, I recently update manually compute field. You have presented a better way, and still counter to monitor the process. Very nice! Congratulations! Fabiano. 2014-07-10 10:39 GMT-03:00 Johann Spies : > Sorry, I sent it before finishing > > > #!/usr/bin/python > # -*- coding: utf-8 -*-

[web2py] Re: Broken ajax links giving "unrecognized expression" error

2014-07-10 Thread Ian W. Scott
I found the culprit! The links were in a list with the bootstrap classes "nav nav-tabs". Because of that the bootstrap js was trying to use the link url to show a tab, but it was the wrong format. The implementation of bootstrap tabs must have changed between versions 2 and 3 enough that my aja

[web2py] Re: Broken ajax links in component

2014-07-10 Thread Ian W. Scott
I found the culprit. The ajax links were in a list with the bootstrap classes "nav nav-tabs". In bootstrap 3 the tabs js was choking on the url when an item was clicked. On Thursday, July 10, 2014 6:57:51 AM UTC-4, Ian W. Scott wrote: > > I'm not running jquery 1.9. It's version 1.10.2. But I ca

[web2py] Easy to Understand SQLFORM.grid Custom Search

2014-07-10 Thread JoeCodeswell
Dear web2py-users, I have written a recipe to customize the SQLFORM.grid search WITHOUT the need to specify a custom search_widget and so needing to read & understand the clever web2py implementation source code. The maintained link to the recipe is here on joecodeswell.wordpress.com

[web2py] How do I iterate over imported methods in a list?

2014-07-10 Thread Maurice Waka
in my web2py app, i created this code that works well in python shell. python modules: #The methods work in such a way that a user inputs an equation query to get an answer. If it is an addition, method1 works it out, the same to other methods being invoked to performing different codes def met

[web2py] Re: How do I iterate over imported methods in a list?

2014-07-10 Thread Anthony
> > method1 = method1 > method1 = method2 > method1 = method3 > method1 = method4 > Why do you make four assignments to the same variable? G0 = [method1, method2, method3, m3thod4] > > def Foo(): > code.. > for (func) in G0: > return func() > > The problem is that only method1 w

Re: [web2py] Easy to Understand SQLFORM.grid Custom Search

2014-07-10 Thread Vinicius Assef
Really good. How about updating the web2pyslices version, too? ;-) On Thu, Jul 10, 2014 at 1:09 PM, JoeCodeswell wrote: > Dear web2py-users, > > I have written a recipe to customize the SQLFORM.grid search WITHOUT the > need to specify a custom search_widget and so needing to read & understand >

[web2py] CKeditor in a loaded component

2014-07-10 Thread Jim S
Has anyone gotten CKeditor working in a textarea in a loaded component? When I try it, it keeps telling me the field is null even if I have text in it. It works fine for me in textareas outside of a component. I had the same result whether I used the CKeditor web2py plugin or just integrated i

[web2py] Re: random lambda error

2014-07-10 Thread Júlia Rizza
I misunderstood it, but it's clear now. Thank you Anthony! Em quinta-feira, 10 de julho de 2014 00h58min22s UTC-3, Anthony escreveu: > > If you just want to specify a URL for redirect, you can do so without the > lambda: > > auth.settings.on_failed_authentication = URL('painel', 'index') > > Howe

[web2py] Re: CKeditor in a loaded component

2014-07-10 Thread Leonel Câmara
I have it working fine using the latest ckeditor web2py plugin. What seems to be happening here is that ckeditor isn't actually being associated with your field's textarea for some reason. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2

Re: [web2py] Easy to Understand SQLFORM.grid Custom Search

2014-07-10 Thread peter
Thanks for this Joe, and it is an interesting approach. However I find the approach I used https://groups.google.com/forum/#!searchin/web2py/sqlform.grid$20search/web2py/9_1ECdKHKUo/8OISg7o8OVIJ Somewhat easier to understand. Your approach is more novel however. Peter -- Resources: - http://

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-07-10 Thread Diogo Munaro
It's working now with '3º fail' that I describe. I'm using fake_migrate_all with previews version and migrate with new version Thx for all helpers! Em quarta-feira, 9 de julho de 2014 19h00min33s UTC-3, Diogo Munaro escreveu: > > I'm with some problems here... I really hate .table files. > > T

[web2py] Re: JSON-RPC calls within controller functions

2014-07-10 Thread lyn2py
Thanks for your response Matheus! no authentication… is there somewhere I can read up on this? I tried searching around google for answers, and ran into using "id", but no idea how that works, it appears that the id is automatically included. It's working on command line, the exact same command

[web2py] Re: How do I iterate over imported methods in a list?

2014-07-10 Thread Rufus
On Thursday, July 10, 2014 12:17:25 PM UTC-4, Maurice Waka wrote: > > in my web2py app, i created this code that works well in python shell. > > python modules: > #The methods work in such a way that a user inputs an equation query to > get an answer. If it is an addition, method1 works it out,

[web2py] Re: update database right from view?

2014-07-10 Thread Brian M
Maria, if you really want to you can build the entire form in the view with good old HTML. 1. An example set of "sentence", "meaning" and word "forms" may be helpful - sounds like you're probably doing some sort of translation thing or maybe it is a quiz? 2. You'll need to add tag