[web2py] Re: Legacy table

2010-12-31 Thread Marcello
Thanks Danes, But this is not the problem. The table has an ID. The problem is that I can't rename the table, and it's name is "another_name" And I want to do something like: db.product.insert(name="Box") Thanks, Marcello On Dec 31, 3:03 pm, DenesL wrote: &g

[web2py] Re: Legacy table

2011-01-01 Thread Marcello
> person.insert(name='blablabla') > > rows = db(person.name=='blablabla').select() > > 2010/12/31 Marcello Parra > > > Hello, > > > I have a legacy database, and want to access it with web2py. > > One table is called "another_name&quo

[web2py] Formstyle can be a function

2011-01-03 Thread Marcello
Hello, I need to customize forms generated by SQLFORM. I saw that formstyle can be a function, and this could solve my problem. But I did not find any doc/example about this... Is there something I can start with ?? Thanks Marcello

[web2py] Re: Formstyle can be a function

2011-01-03 Thread Marcello
Thanks Di Pierro Sorry, I'm new to web2py and have many questions... I'd like do do this the right way So, where is the best place to define myformstyle and place crud.settings.formstyle=myformstyle ? Thanks, Marcello On Jan 3, 9:22 pm, mdipierro wrote: > You would defin

[web2py] Connection timed out - mysql

2012-07-12 Thread Marcello
RDS. Thanks for any help... Marcello - Traceback (most recent call last): File "/home/tecno2/web2py/gluon/shell.py", line 206, in run execfile(startfile, _env) File "applications/segundarj/private/diario.py", line 2, in planilha.roda(True) File "application

[web2py] New style - Lazy Field

2012-05-03 Thread Marcello
h new style... Thanks Marcello

[web2py] Re: New style - Lazy Field

2012-05-03 Thread Marcello
Anthony, Worked fine... Thanks very much... Marcello On Thursday, May 3, 2012 1:07:35 PM UTC-3, Anthony wrote: > > I believe the argument to Field.Virtual and Field.Lazy just needs to be a > callable object that takes a Row object as an argument, so you could write > a funct

[web2py] Select with text field

2012-07-06 Thread Marcello
n the select, I don't use those fields What cat I do to solve this ?? Thanks Marcello

[web2py] Re: One to many question

2012-01-10 Thread Marcello
Yes... I forgot to say that... But this is a legacy database, and I can't rename the field Thanks Anthony On 10 jan, 12:16, Anthony wrote: > On Tuesday, January 10, 2012 8:56:34 AM UTC-5, Marcello wrote: > > > Hello, > > > Maybe this is a stupid question. &g

[web2py] Re: Set table name

2012-01-13 Thread Marcello
No one ?? On 10 jan, 14:51, Marcello Parra wrote: > 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 h

[web2py] Re: Set table name

2012-01-16 Thread Marcello
Would be great This solution works great... but it's not accessible in the modules files, because dog is not visible there... On 14 jan, 15:21, Massimo Di Pierro wrote: > eventually we shoud have a way to remap table and field names that was > one of the main reason for rewriting the dal.

[web2py] Cookbook - No indentation ??

2012-03-15 Thread Marcello
Hello, I just bought my web2py Application Development Cookbook from Amazon (Kindle version)... I noticed that all python code is not indented Is it ? Ebook or PDF has the same problem ?? Thanks, Marcello

[web2py] Re: Cookbook - No indentation ??

2012-03-15 Thread Marcello
I bought mine from Amazon... don't know if I have access to that But my interest in the moment is not run code. I want to read the book And read the code without indentation is almost impossible... If my book is correct, it is almost useless. On Thursday, March 15, 2012 4:26:24 PM

[web2py] Re: Cookbook - No indentation ??

2012-03-17 Thread Marcello
that the only one that is OK is PDF Thanks, Marcello On Thursday, March 15, 2012 8:11:34 PM UTC-3, Monte Milanuk wrote: > > On Thu, 15 Mar 2012 12:32:14 -0700, Marcello wrote: > > > I bought mine from Amazon... don't know if I have access to that > > > &g

Re: [web2py] Re: Cookbook - No indentation ??

2012-03-17 Thread Marcello
I screwed with nobody. I just pointed a fact. I have many Python eBooks(ePub) and ALL of them have NO formatting or indentation problem. Even Kindle has no indentation problem in all of my Python books. Marcello On Saturday, March 17, 2012 3:04:58 PM UTC-3, AngeloC wrote: > > Kind

[web2py] Re: Tell Web2py Groups: The Web2py Book 3rd Edition is long over due

2011-09-26 Thread Marcello
Hello Massimo, Any ETA on that ? Thanks On 26 set, 22:44, Massimo Di Pierro wrote: > I guess you mean the 4th edition... working on it. > > On Sep 26, 7:53 pm, Pystar wrote: > > > > > > > > > I think that the Web2py Book 3rd Edition is long over due as most of > > the new features arent in the

[web2py] Virtual field in SQLFORM.grid

2016-01-19 Thread Marcello
ror Why do this happen ??? Is there a way to get this ?? Thanks Marcello db.define_table( 'trabalho', Field('descricao','string'), Field.Virtual('total', lambda row: row.trabalho.konsulta.count()), ) db.define_table( 'konsulta&

Re: [web2py] Virtual field in SQLFORM.grid

2016-01-20 Thread Marcello
In other words... Is there a way to show a total of the child table in each row of the master table (grid) ?? Thanks On Tuesday, January 19, 2016 at 5:52:51 PM UTC-2, Marcello wrote: > > Yes. I can see the tables... > And yes... I can call the function.. It's working OK

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Marcello
I tried it. It gives me the old value. I have to leave the shell and enter again to refresh it... This is my problem On Friday, April 1, 2016 at 11:53:52 AM UTC-3, Niphlod wrote: > > yep, you need to re-select it ... > > On Friday, April 1, 2016 at 3:26:39 PM UTC+2, Marcello wrote:

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Marcello
restriction explained earlier still > applies: if the other process doesn't commit(), your shell will still see > no changes at all. > > On Friday, April 1, 2016 at 5:07:52 PM UTC+2, Marcello wrote: >> >> I tried it. >> It gives me the old value. >> I have

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Marcello
27;t modified, so how can you tell > the data is actually "modified in the DB" ? > > On Friday, April 1, 2016 at 6:21:46 PM UTC+2, Marcello wrote: >> >> Yes. Sure... the data is modified in the DB. >> >> >> On Friday, April 1, 2016 at 12:14:51 PM U

[web2py] Re: Shell - reload record from server

2016-04-02 Thread Marcello
e ? > > On Friday, April 1, 2016 at 10:07:20 PM UTC+2, Marcello wrote: >> >> Example: >> >> In [1]: k = db.konsulta(3514998) >> >> In [2]: k.ok >> Out[2]: 1L >> >> (I change the ok value of this record id DB in mysql's console (and &

[web2py] Python3 and Soap

2018-05-27 Thread Marcello
Hello, I'm trying to create a Soap server with Python3 and web2py. Tested with the example from manual,I put in a controller: @service.soap('MyAdd', returns={'result':int}, args={'a':int, 'b':int,}) def add(a, b): return a + b And when I run client.MyAdd(a=1, b=2) in a client, I get the erro

[web2py] GAE - Shell

2014-04-03 Thread Marcello
Hello, I started to play with web2py and GAE. I want to run a remote shell with something like: python web2py.py -M -S app_name But remotely... I looked everywhere but I did not find an answer... Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://git

[web2py] py4web shell

2019-09-24 Thread Marcello
Hello all, Does py4web already have a shell like web2py? Thanks -- 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 because you a

[web2py] Re: py4web shell

2019-09-25 Thread Marcello
has not magic and apps are modules. > > > On Tuesday, 24 September 2019 19:49:09 UTC-7, Marcello wrote: >> >> Hello all, >> >> Does py4web already have a shell like web2py? >> >> Thanks >> >> -- Resources: - http://web2py.com - http://web

[web2py] Re: py4web shell

2019-09-25 Thread Marcello
", line 494, in __call__ app_name = action.app_name AttributeError: type object 'action' has no attribute 'app_name' >>> Something wrong here ?? On Wednesday, September 25, 2019 at 10:56:32 AM UTC-3, Marcello wrote: > > Great Massimo. > > Thank you.

[web2py] Re: py4web shell

2019-09-27 Thread Marcello
Worked now. Thanks Massimo... On Friday, September 27, 2019 at 1:20:51 AM UTC-3, Massimo Di Pierro wrote: > > Fixed. please try now. > > On Wednesday, 25 September 2019 23:57:46 UTC-7, Massimo Di Pierro wrote: >> >> Oops. Will fix it tomorrow. > > -- Resources: - http://web2py.com - http://we

[web2py] Re: py4web shell

2019-09-27 Thread Marcello
Hi again There seems to be a problem with ipython when imports py4web... Are you aware of it ? On Friday, September 27, 2019 at 1:20:51 AM UTC-3, Massimo Di Pierro wrote: > > Fixed. please try now. > > On Wednesday, 25 September 2019 23:57:46 UTC-7, Massimo Di Pierro wrote: >> >> Oops. Will

[web2py] MySQL server has gone away - py4web

2020-02-11 Thread Marcello
ot happen... Is it a bug or a problem here ? Thanks Marcello -- 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 because you are s

[web2py] Re: MySQL server has gone away - py4web

2020-02-14 Thread Marcello
Hi, Any informatiion about this ? Nobody using py4web with mysql ?? On Tuesday, February 11, 2020 at 6:58:11 PM UTC-3, Marcello wrote: > > Hello, > > I'm trying py4web and found something stragne. > Don't know if I'm making something wrong. > > I'm hav

[web2py] Re: MySQL server has gone away - py4web

2020-02-15 Thread Marcello
e timeout in the mysql config example. > Can you repro with latest py4web? > > On Friday, 14 February 2020 14:31:58 UTC-8, Marcello wrote: >> >> Hi, >> >> Any informatiion about this ? >> Nobody using py4web with mysql ?? >> >> >> >> O

[web2py] Re: MySQL server has gone away - py4web

2020-02-16 Thread Marcello
e the problem? > > > On Saturday, 15 February 2020 04:15:38 UTC-8, Marcello wrote: >> >> I'm with lastest version... >> >> Shouldn't reconnect to db every page load ??? >> If the server stays 1 hour without serving pages, a reconnection is >

[web2py] Re: MySQL server has gone away - py4web

2020-02-18 Thread Marcello
Hi Massimo, Great ! Now worked fine... Thanks On Tuesday, February 18, 2020 at 12:22:04 AM UTC-3, Massimo Di Pierro wrote: > > sorry. My bad. try: > > +self._adapter.reconnect() > > On Sunday, 16 February 2020 19:17:25 UTC-8, Marcello wrote: >> >> I got t

[web2py] Re: MySQL server has gone away - py4web

2020-02-21 Thread Marcello
It's 20191227.1 On Friday, February 21, 2020 at 12:48:32 AM UTC-3, Massimo Di Pierro wrote: > > Can you check which version of pydal you are using? > Need to decide whether to make this the default behavior > > On Tuesday, 18 February 2020 03:35:47 UTC-8, Marcello wro

Re: [web2py] Re: Scalability of web2py?

2010-12-01 Thread Marcello Parra
What is the largest application running web2py today? On Wed, Dec 1, 2010 at 5:28 PM, Kuba Kucharski wrote: > 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 and Massimo himself. >

Re: [web2py] Re: Scalability of web2py?

2010-12-01 Thread Marcello Parra
Massimo, Any doc/reference about this? Thanks On Wed, Dec 1, 2010 at 11:20 PM, mdipierro wrote: > web2py introduces a penalty when you have lots of tables and there are > some optimizations that need to be done in that case. > >

[web2py] Legacy table

2010-12-31 Thread Marcello Parra
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

Re: [web2py] Re: Formstyle can be a function

2011-01-03 Thread Marcello Parra
last 10 lines of SQLFORM.__init__ > > On Jan 3, 11:38 am, Marcello wrote: > > Hello, > > > > I need to customize forms generated by SQLFORM. > > I saw that formstyle can be a function, and this could solve my > > problem. > > > > But I did not find an

Re: [web2py] Re: Connection timed out - mysql

2012-07-13 Thread Marcello Parra
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

Re: [web2py] Re: Connection timed out - mysql

2012-07-13 Thread Marcello Parra
ettings. It > could be a threading issue since you use it in modules. > > Which version of web2py are you using? > > Massimo > > > On Friday, 13 July 2012 10:01:11 UTC-5, Marcello wrote: >> >> My "Connection timed out" problem continues with trunk

Re: [web2py] Re: Connection timed out - mysql

2012-07-13 Thread Marcello Parra
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 201

Re: [web2py] Select with text field

2012-07-06 Thread Marcello Parra
... But I found that should be an easier way Thanks... On Fri, Jul 6, 2012 at 10:30 AM, Richard Vézina wrote: > What the nature of the data in size? > > Could you show us your select statment? > > Richard > > > On Fri, Jul 6, 2012 at 8:41 AM, Marcello wrote:

Re: [web2py] Select with text field

2012-07-06 Thread Marcello Parra
efault/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 wrote: > >> Hello, Richard, >> &

[web2py] One to many question

2012-01-10 Thread Marcello Parra
nt), Field('name','string'), migrate=False) I get an user: u = db.user[1] If I want to get the account name of that user: u.account_id.name But I want to have it with: u.account.name Is it possible ?? Thanks Marcello

Re: [web2py] Re: One to many question

2012-01-10 Thread Marcello Parra
= Field.Virtual(lambda row: row.item.unit_price*row.item.quantity) Thanks, Marcello On Tue, Jan 10, 2012 at 12:58 PM, Ross Peoples wrote: > You might be able to do something like this to trick it into being a > virtual field: > > db.user.account = Field.Virtual(lambda row: row.account_

[web2py] Set table name

2012-01-10 Thread Marcello Parra
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', Field('name'),

Re: [web2py] Re: Set table name

2012-01-13 Thread Marcello Parra
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 wrote: > I don't know if anyone has tried this kind of thing before. The only idea > I ha

Re: [web2py] Re: Set table name

2012-01-13 Thread Marcello Parra
ct() > > On Fri, Jan 13, 2012 at 2:37 PM, Marcello Parra wrote: > >> Thanks Ross >> >> I tried this, but did not work: >> >> - db.person[1].dog.select() raises: >> KeyError: 'dog' >> >> but >> - db.person[1].dog12345.

Re: [web2py] Re: Set table name

2012-01-13 Thread Marcello Parra
Anthony, thanks very much On Fri, Jan 13, 2012 at 12:03 PM, Anthony 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 dictionar

Re: [web2py] Re: Set table name

2012-01-16 Thread Marcello Parra
on, Jan 16, 2012 at 5:15 PM, Marin Pranjić wrote: > > On Mon, Jan 16, 2012 at 5:56 PM, Marcello wrote: > >> Would be great >> >> This solution works great... but it's not accessible in the modules >> files, because dog is not visible there... >> >&g

Re: [web2py] web2py @ pycon 2011

2011-02-17 Thread Marcello Parra
+ 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 >

Re: [web2py] Re: web2py not working

2013-05-15 Thread Marcello Console
i tried with web2py.py -a arandompassword I didn't get the previos message, and got instedad web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2013 Version 2.4.6-stable+timestamp.2013.04.06.17.37.38 Database drivers available: SQLite(sqlite3), MySQL(pymysql), MySQL(MySQLdb), Postgre

Re: [web2py] Re: DAL size limit for query?

2016-08-03 Thread Marcello Console
when trying in the shell, the shell itself got killed : >> In [4]: legacy_db(query).select() >> >> Killed >> root@rb:/home/www-data/web2py# Even using executesql (but i can query sqlite directly) "step out apache": Does this mean stopping apache? Thank you a lot for your help 2016-08-03 22:35

Re: [web2py] Re: DAL size limit for query?

2016-08-04 Thread Marcello Console
2016-08-04 1:08 GMT+02:00, Dave S : > > > On Wednesday, August 3, 2016 at 2:33:35 PM UTC-7, goome wrote: >> >> when trying in the shell, the shell itself got killed : >> >> In [4]: legacy_db(query).select() >> >> >> >> Killed >> >> root@rb:/home/www-data/web2py# >> >> > Is that using web2py in a ba

Re: [web2py] Re: DAL size limit for query?

2016-08-27 Thread Marcello Console
thank you for your answer and sorry for the delay, i had been some days away. at this time the code that fails is: tabella = request.args[0] response.headers['Content-Type']='text/x-csv' response.headers['Content-Disposition']='attachment;filename="report.csv" ' dati = legacy_db().select(legacy_db

Re: [web2py] Re: DAL size limit for query?

2016-08-29 Thread Marcello Console
> >> moreover, i should 'append' the row to a pydal.objects.Rows >> as to say >> dati += row >> but how can i do this? >> >> > That one looks easy: data.append(row) but how can i create first 'data' as a pydal.objects.Rows? > > >> Thank you a lot again >> >> > Good luck! > > /dps > > >> >> 2016-

Re: [web2py] Re: import_from_csv_file

2016-01-11 Thread Marcello Console
Thank you 2016-01-11 20:25 GMT+01:00, Anthony : > db.mytable.import_from_csv(..., unique='my_unique_column') > > will do an update instead of an insert if the value of the > "my_unique_column" field matches that of an existing record in the > database. > > Anthony > > On Monday, January 11, 20

Re: [web2py] Virtual field in SQLFORM.grid

2016-01-19 Thread Marcello Parra
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 i

Re: [web2py] Virtual field in SQLFORM.grid

2016-01-20 Thread Marcello Parra
in the grid... Can someone explain to me why ?? On Tue, Jan 19, 2016 at 3:09 PM, Marcello wrote: > Hello, > > I have a one to many configuration, using mysql database. > I want to show a grid with the "one" table, and for each row, count the > "many". >

Re: [web2py] Re: view

2016-01-21 Thread Marcello Console
Thank you a lot for all of your tips 2016-01-21 14:24 GMT+01:00, Anthony : > When you display a Rows object in a view, it gets wrapped in SQLTABLE, > which by default truncates values in each cell to 16 characters. To change > that, you can call SQLTABLE explicitly: > > {{=SQLTABLE(form, truncate=

[web2py] Shell - reload record from server

2016-04-01 Thread Marcello Parra
hanks, Marcello -- 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 because you are subscribed to the Google Groups "web2py-users&

Re: [web2py] Re: rediretct 2 https [ ubuntu.sh]

2016-04-07 Thread Marcello Console
2016-04-07 15:29 GMT+02:00, Massimo Di Pierro : > No problem. Which script are you referring to? Sorry the exact name is : setup-web2py-ubuntu.sh I supposed i downloaded it from http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh as so it is suggested from the book But i see i have tha

Re: [web2py] Re: rediretct 2 https [ ubuntu.sh]

2016-04-07 Thread Marcello Console
2016-04-07 19:33 GMT+02:00, Dave S : > The scripts reflect Web2Py defaulting to the "HTTPS Everywhere" > recommendations, no? but why overloading every request with httpS ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

Re: [web2py] Re: from desktop to web2py

2015-05-07 Thread Marcello Console
Thank you for your help Stifan. The problem here is that i need to let the user choose among some value gotted from the excel file he gave as input. And i should do this meanwhile writing other files. How can i do this? Make all this stuff as an ajax function called after the user select the file i

Re: [web2py] Re: from desktop to web2py

2015-05-09 Thread Marcello Console
Thank you again Stifan. I solved the poresent problem, but i suppose in a not efficiente and even les elegant way... The second form, should be in the the second view, am i right? To face, i need to change the in memory db to oon disk, and working with apache configuration for let me pass all the v