Hello,
I have a function that I call in a shell...
I load a record from a database and do some stuff..
Problem is that in the meantime the record may be modified in the server...
Is there a way to reload the record from the database to track possible
changes ??
(I'm using mysql)
Thanks,
I could make it work.
Changed the virtual field from:
Field.Virtual('total', lambda row: row.trabalho.konsulta.count()),
To:
Field.Virtual('total', lambda row: db((db.konsulta.trabalho_id==
row.trabalho.id)).count())
Both fields work in the shell, but just the second works in the grid...
Can
Yes. I can see the tables...
And yes... I can call the function.. It's working OK...
Thanks...
On Tue, Jan 19, 2016 at 4:39 PM, Fabiano Almeida
wrote:
> Hi Marcello,
>
> Can you see your tables in appadmin?
>
> And your lambda, you can create and call function to count
My Connection timed out problem continues with trunk also.
I also testes the same queries using Django. No problem.
I tested many times.
On Thu, Jul 12, 2012 at 9:25 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
The Assertion error comes from pymysql which ships with web2py. I just
Massimo,
Yes. You are right.
With mysqldb worked fine.
Is there any problem to use mysqldb ??
On Fri, Jul 13, 2012 at 12:52 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
To narrow down the problem. Django uses mysqldb, not pymysql. Could you
try switch to mysqldb with web2py?
No.
I'll do that.
Thanks again.
On Fri, Jul 13, 2012 at 3:20 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
No but this should be reported to the pysqldb folks.
Would you mind opening an issue there?
massimo
On Friday, 13 July 2012 13:10:14 UTC-5, Marcello wrote:
Massimo,
Hello, Richard,
I save 2 HTML pages.
SELECT processo.id, processo.na, processo.na_limpo, processo.nu,
processo.nu_limpo, processo.html, processo.html1, processo.processado,
processo.processado2, processo.processado_dia, processo.origem,
processo.classe, processo.fase, processo.assunto,
/default/chapter/29/6#executesql
If your request is slow at backend level, maybe you have a problem with
your design...
What is your backend?
Richard
On Fri, Jul 6, 2012 at 11:12 AM, Marcello Parra parro...@gmail.comwrote:
Hello, Richard,
I save 2 HTML pages.
SELECT processo.id
I pass db to module...
Works fine...
But I was setting (in the model):
dog = 'dog12345'
So.. in the module I see db and not dog...
To make it work, I should pass dog also
As I have many associations in this project, this wold make it almost
impossible to implement
On Mon, Jan 16,
Thanks Ross
I tried this, but did not work:
- db.person[1].dog.select() raises:
KeyError: 'dog'
but
- db.person[1].dog12345.select()
works fine
On Fri, Jan 13, 2012 at 10:46 AM, Ross Peoples ross.peop...@gmail.comwrote:
I don't know if anyone has tried this kind of thing
, Jan 13, 2012 at 2:37 PM, Marcello Parra parro...@gmail.comwrote:
Thanks Ross
I tried this, but did not work:
- db.person[1].dog.select() raises:
KeyError: 'dog'
but
- db.person[1].dog12345.select()
works fine
On Fri, Jan 13, 2012 at 10:46 AM, Ross Peoples ross.peop
Anthony, thanks very much
On Fri, Jan 13, 2012 at 12:03 PM, Anthony abasta...@gmail.com wrote:
Thanks a lot.
This solved the problem
Two questions:
- why the brackets ??
Tables and fields can be accessed as properties via the usual .
notation, but also via keys like a
Hello,
Maybe this is a stupid question.
But I could not find the answer anywhere
I have, for example, 2 tables:
db.define_table('account',
Field('name','string'),
migrate=False)
db.define_table('user',
Field('account_id',account),
Field('name','string'),
migrate=False)
Hello Massimo and all,
I'm trying to use web2py for several projects of mine.
I always find a problem that should be solved if I could set the table name.
Let me show an example...
Suppose that I have this:
db.define_table('person12345', Field('name'))
db.define_table('dog12345',
+ 1
On Thu, Feb 17, 2011 at 12:35 PM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
Is it possible to listen in webminar form?
If yes, how much could it be?
I pay for a webminar any when because I can't move to Atlanta...
Richard
OK... Thanks...
I'll take a look
But as I understand, I should insert this function in every SQLFORM call
If this would be a default in all application is there a way that I could
not duplicate code ??
On Mon, Jan 3, 2011 at 3:46 PM, mdipierro mdipie...@cs.depaul.edu wrote:
No but
Hello,
I have a legacy database, and want to access it with web2py.
One table is called another_name in the database (mysql).
But I want to use it in web2py as:
db.define_table('person', Field('name'))
I read docs, but could not figure this out
Thanks for any help...
Marcello
What is the largest application running web2py today?
On Wed, Dec 1, 2010 at 5:28 PM, Kuba Kucharski kuba.kuchar...@gmail.comwrote:
Web2py is waiting for the first brave ONE to (be able to) GO and try
to SCALE. I believe this person will get a lot of attention and
resources from community
Massimo,
Any doc/reference about this?
Thanks
On Wed, Dec 1, 2010 at 11:20 PM, mdipierro mdipie...@cs.depaul.edu wrote:
web2py introduces a penalty when you have lots of tables and there are
some optimizations that need to be done in that case.
19 matches
Mail list logo