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

2014-07-14 Thread Johann Spies
On 10 July 2014 15:50, Fabiano Almeida fabi...@techno7.com.br wrote: Congratulations! Thanks but I do not deserve the congratulation. I was helped by somebody on this list years ago to update computed fields. Unfortunately I cannot recall the name now. I think I just added the counter for

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)

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 johann.sp...@gmail.com: Sorry, I sent it before finishing #!/usr/bin/python # -*-