Re: [web2py] web2py 2.6.4 is OUT - IMPORTANT

2013-09-21 Thread Ovidio Marinho
+1 ok Ovidio Marinho Falcao Neto ITJP.NET.BR ovidio...@gmail.com Brasil 2013/9/21 Massimo Di Pierro > web2py 2.6.4 is OUT. I fixes some more bug and fixes a problem with > sessions in 2.6.x. > > If you are using 2.6.x you sho

[web2py] Re: Returning Chunks of Data as with WSGI

2013-09-21 Thread Massimo Di Pierro
yes and no. You cannot do this: def index(): yield 'a' yield 'b' yield 'c' But you can do this: def index(): def iterator(): yield 'a' yield 'b' yield 'c' return iterator() A web2py action must return something. It can return an iterator

[web2py] Returning Chunks of Data as with WSGI

2013-09-21 Thread archeaneon
With WSGI you can slowly return in a connecting using yield command or with a list or queue (in gevent), is this (and how is this) possible with web2py? Thank you in advance! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

[web2py] web2py 2.6.4 is OUT - IMPORTANT

2013-09-21 Thread Massimo Di Pierro
web2py 2.6.4 is OUT. I fixes some more bug and fixes a problem with sessions in 2.6.x. If you are using 2.6.x you should definitively upgrade. Massimo -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: count record created in a 10 minutes interval

2013-09-21 Thread Massimo Di Pierro
There is no web2py API for this because, to my knowledge, almost none of the supported database can do it. Web2py supports Vertica (http://www.vertica.com/). Vertica can do this: def fpbts(field1,field2,field3,minutes=5): return Expression(field1.db,"FIRST_VALUE(%s) OVER (PARTITION BY TIME_S

[web2py] Re: sqlform.grid with div instead of html tables

2013-09-21 Thread Adi
Sorry Anthony, I should've been more specific... Wasn't related to your example, that's why I replied to the original message. I was just showing the way to format the data, even with the grid as is, without replacing the whole format. On Saturday, September 21, 2013 5:51:49 PM UTC-4, Anthony

[web2py] Re: sqlform.grid with div instead of html tables

2013-09-21 Thread Anthony
Sorry, not sure I follow. What does this have to do with the following code: mydisplay = myformat(grid.rows) grid.element('.web2py_table', replace=mydisplay) The above should replace the entire grid table (which means the "links" argument would be useless, as it is used to add elements to the gr

[web2py] Re: sqlform.grid with div instead of html tables

2013-09-21 Thread Adi
I'm formatting the data for certain columns within each row by calling a function, and returning an XML element, which then displays HTML within that cell. Code bellow is just to give you an idea... GRID: links=dict(orderMaster=[ lambd

[web2py] Re: count record created in a 10 minutes interval

2013-09-21 Thread António Ramos
For simplicity I can accept a query of records saved within an hour.so only 24 slots. I know that I create at least one record for every 10 minutes. I want to create a scale for every hour. If I detect 5 or 6 records created I draw a green cell, in the other hand zero records is bad and I create a

[web2py] Re: sqlform.grid with div instead of html tables

2013-09-21 Thread Anthony
On Saturday, September 21, 2013 7:24:24 AM UTC-4, Niphlod wrote: > nope, there's absolutely no support to output a grid as a series of divs. > btw, that's what the tables are for (displaying data). > I understand the "move" done a few years ago to avoid using table as a way > to format the whole

[web2py] Re: sqlform.grid with div instead of html tables

2013-09-21 Thread Anthony
> mydisplay = myformat(grid.rows) > grid.element('.web2py_table', replace=mydisplay) > The above should work (works for me). Can you show more of your code and the resulting HTML? Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/we

[web2py] Re: sqlform.grid with div instead of html tables

2013-09-21 Thread ssuresh
The problem is that my data does not display too well in a table grid. Some of my columns are descriptions that do not fit well inside a grid. So I want to display it in a more readable alternate formats. - Something like *Title * description .. *date*

Re: [web2py] Re: pluralization system problem

2013-09-21 Thread mcamel
Ok. I did so and worked fine. I supposed words needed to be included in translation file once, but in fact, expressions including words has to be included also in the dictionary as if they were words itself. I propose this to be included in the manual: 1. expressions including words has to

[web2py] download url

2013-09-21 Thread Manuele Pesenti
Hi! what's the correct way to get the download url from a table record which model contains a field of type upload? thank you best regards Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google

[web2py] Re: Some forms need to be submitted multiple times.

2013-09-21 Thread Ian W. Scott
Thanks Niphlod. I submit the form and get back the same form, empty. It's as if the submitted data is just dumped and the page reloads as if nothing had been sent. I'll try the replacement you suggest and get back to you. Ian On Friday, September 20, 2013 5:12:35 PM UTC-4, Niphlod wrote: > > I

[web2py] Re: count record created in a 10 minutes interval

2013-09-21 Thread Niphlod
example needed do you want 6*24=144 different groups each one holding a "slice" of 10 minutes with the number of records in it, given a day? i.e. 1 --> 00:00 to 00:09 --> 3 records 2 --> 00:10 to 00:19 --> 4 records 144 --> 23:50 to 23:59 --> 1 record On Saturday, September 21, 2013

[web2py] count record created in a 10 minutes interval

2013-09-21 Thread António Ramos
Hello, how can i count/group how many records were created in a 10 minutes period over a day? Thank you -- 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) --- Y

[web2py] Re: sqlform.grid with div instead of html tables

2013-09-21 Thread Niphlod
nope, there's absolutely no support to output a grid as a series of divs. btw, that's what the tables are for (displaying data). I understand the "move" done a few years ago to avoid using table as a way to format the whole page in sections, but really I don't understand the need to remove table

[web2py] Re: Frustration with SQLFORM and date formata

2013-09-21 Thread Niphlod
and I can check why form.vars doesn't work. I suspect you're right though: form.vars "happens" after the call to the validator formatter, that is the one "translating" the date format. On Saturday, September 21, 2013 1:52:52 AM UTC+2, Joe Barnhart wrote: > > You are a wizard Mr. Niphlod. Using

Re: [web2py] Re: pluralization system problem

2013-09-21 Thread Vladyslav Kozlovskyy
One addition to the step 8: Record with "word" in plural-*.py files appears ONLY during execution T() or T.M() with correspondent "%%{word}" template in it. So before editing plural forms you need to execute you application once (step 9) or you need to fill plural-*.py files manually as a Pytho