Good point, but I put the commits after the function returns as there are a
number of inserts in a variety of tables. So is it preferred to do a commit
after every insert instead of grouping them together for one big commit?
TIA Ben
On Friday, September 1, 2017 at 12:35:01 AM UTC-7, Val K
Also, if i am inserting within a for loop, should I place the db.commit()
within the for loop too?
On Friday, September 1, 2017 at 9:59:11 AM UTC-7, Ben Lawrence wrote:
>
> Good point, but I put the commits after the function returns as there are
> a number of inserts in a variety of tables. So
this works
db.Role.object_super_object_FK.requires = IS_IN_DB(db (db.cost_center.id),
'cost_center.super_object_fk', '%(cost_center_title)s', zero = T('choose
one'))
but when I try to pass the table name as a var, it doesn't understand the
var
specificTableToSearchMembersFromID =
had you tried ?
e.g.
specificTableToSearchMembersFromID = db.cost_center.id
best regards,
stifan
--
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
I believe, that between inserts/updates and selects you should do commit
On Friday, September 1, 2017 at 10:15:00 PM UTC+3, Dave S wrote:
>
>
>
> On Friday, September 1, 2017 at 10:03:48 AM UTC-7, Ben Lawrence wrote:
>>
>> Also, if i am inserting within a for loop, should I place the db.commit()
In SQL Server, you can run queries across database tables following the
syntax you mention if you have permissions to access both databases and
they are on the same server. I presume the same is true on other (not all)
database engines. If you have the SQL, then use the executesql feature and
sorry, should have mentioned that I tried that and every combination
possible
--
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
Ok, thanks.
Am 02.09.2017 06:22 schrieb "Massimo DiPierro" :
> also we can assume git is already installed so it is a matter of calling
> subprocess. I would take a patch to simplify the code. :-)
>
> On Sep 1, 2017, at 11:21 PM, Martin Weissenboeck
It is fine to have one web2py and as many domains as you need. It should
not affect performance provided you take advantage of the cores you have.
That means you want to make sure you use nginx+uwsgi or gevent or gunicorn
and have about one process per core.
On Friday, 1 September 2017
There is an advantage in having some minimal version control functionality
available through the web admin.
We just have the wrong functionality.
What we need is commit, push, and pull only. In that an admin can upgrade
an app by pressing a button in admin, without having to login.
On
Hi,
I'm trying to upload images to auth_user without success. I already did it
with other database tables with no problem.
My code:
model:
auth.settings.extra_fields['auth_user'] = [
Field('picture', 'upload', autodelete=True, label=T('Picture')),
]
I'm using the appadmin interface
Includes a few bug-fixes (thanks to Anthony and Leonel in particular) and
it is tracking the latest python (thanks Giovanni).
Please report any outstanding problem so we can continue make web2py better.
Massimo
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
also we can assume git is already installed so it is a matter of calling
subprocess. I would take a patch to simplify the code. :-)
> On Sep 1, 2017, at 11:21 PM, Martin Weissenboeck wrote:
>
> I agree!
>
> Am 02.09.2017 06:18 schrieb "Massimo Di Pierro"
I agree!
Am 02.09.2017 06:18 schrieb "Massimo Di Pierro" :
There is an advantage in having some minimal version control functionality
available through the web admin.
We just have the wrong functionality.
What we need is commit, push, and pull only. In that an admin
is
db.Role.object_super_object_FK.requires = IS_IN_DB(db (db.cost_center.id),
'cost_center.super_object_fk', '%(cost_center_title)s', zero = T('choose
one'))
really work ?
*from the book :*
IS_IN_DB(db|set,'table.value_field','%(representing_field)s',zero='choose
one')
where the third and
well, I got a variable to work at least:
specificTableToSearchMembersFromID = 'cost_center.id>0'
db.Role.object_super_object_FK.requires =
IS_IN_DB(db(specificTableToSearchMembersFromID),
'cost_center.super_object_fk', '%(cost_center_title)s', zero = T('choose
one'))
--
Resources:
-
On Thursday, August 31, 2017 at 3:05:56 PM UTC-7, Massimo Di Pierro wrote:
>
> Can you tell us more about your setup?
>
>
AWS Linux, Python=2.7.12, web2py-shake-the-box: webp2y (2.14.6) + Rocket
+ Sqlite.
Since this is still evolving into production, and usually doesn't involve a
lot of
On Friday, September 1, 2017 at 10:03:48 AM UTC-7, Ben Lawrence wrote:
>
> Also, if i am inserting within a for loop, should I place the db.commit()
> within the for loop too?
>
> On Friday, September 1, 2017 at 9:59:11 AM UTC-7, Ben Lawrence wrote:
>>
>> Good point, but I put the commits after
from the book:
Remember to call db.commit() at the end of every task if it involves
inserts/updates to the database. web2py commits by default at the end of a
successful action but the scheduler tasks are not actions.
On Friday, September 1, 2017 at 8:30:00 AM UTC+3, Ben Lawrence wrote:
>
>
You are totally correct my friend.
I updated gluon\packages\dal\pydal with latest pyDal to resolve the issue.
On Friday, September 1, 2017 at 3:37:53 AM UTC+5:30, Massimo Di Pierro
wrote:
>
> you have the latest web2py but you have an older pydal.
>
> On Tuesday, 29 August 2017 03:47:39 UTC-5,
Hello,
after a long years of active use of web2py it came to me that probably I am
not doing it as it should! :)
So within one web2py i have several applications and each one is acctualy a
separate site ona a different domain. Is this best pracitce or should i
have one web2py instance for
21 matches
Mail list logo