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
> 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
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
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
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
h new style...
Thanks
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
n the select, I don't use those fields
What cat I do to solve this ??
Thanks
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
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
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.
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
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
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
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
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
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&
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
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:
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
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
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
&
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
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
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
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
", 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.
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
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
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
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
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
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
>
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
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
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.
>
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.
>
>
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
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
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
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
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
...
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:
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,
>>
&
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
= 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_
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'),
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
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.
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
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
+ 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
>
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
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
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
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
>
>> 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-
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
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
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".
>
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=
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&
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
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)
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
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
66 matches
Mail list logo