If you don't need this page to be update more then once a day or once a
hour what you can do is this :
You make sub-function that you gonna cache
def __sub_func_NAME():
complex query
return var
def display_func():
var = cache.ram('var',
lambda: __sub_func_sample
For this purpose they are not...I may include a field on printers table
that inform the date I searching for.
If what I want to do in this page is still not clear I can try to explain
more.
basically its a grid that each TD have a bg-color dependant on it last date
EmpresaTb = db.define_table
Would you show your models...
You make complexe queries, maybe your models are not pretty well design for
the purpose.
Richard
On Wed, May 16, 2012 at 3:22 PM, Fabiano Faver wrote:
> But because of the group by clause it are too slow and I curious to know
> if I can query each company separate
But because of the group by clause it are too slow and I curious to know if
I can query each company separately do what i must with the data and show
the result on page as soon as they are ready
2012/5/16 Fabiano Faver
> I'm trying to display a table with the name of some companies with the
> b
I'm trying to display a table with the name of some companies with the
background color of each TD or DIV dependent of the last day the printers
company were checked
this it what I have now:
def exibicao_empresas():
#get companies
empr = db(auth.accessible_query('read', db.empresa,
au
Show code, very difficult to follow you...
Richard
On Wed, May 16, 2012 at 2:44 PM, Fabiano Faver wrote:
> I have a page that have a slow query using group by but it are slowing
> down the query so I thought to load each item separately and showing them
> as they are done. Web2py have any tool
6 matches
Mail list logo