[web2py] Re: Web2py Update records only if user is signed in with a different session from previous

2016-10-05 Thread Meinolf
Ok, i was first storing the current session id from some insert statement, thanks now i can just access it directly from response.session_id. I guess my logic is wrong since i am running all these queries in the same function, i end up inserting the current session_id and testing it against

[web2py] Re: Proposal to add 'extend' to DIV

2016-10-05 Thread Joe Barnhart
Yep. That is essentially what "extend" does. It's a standard method in the Python list class. Since DIV has a lot of "list" behavior I think it would be nice to "extend" it to have extend() as well! -- Joe On Wednesday, October 5, 2016 at 3:19:52 PM UTC-7, Dave S wrote: > > > > On

Re: [web2py] Re: Translate on table content ?

2016-10-05 Thread António Ramos
Thank you Leonel. 2016-10-04 11:19 GMT+01:00 Leonel Câmara : > I have solved this problem in 2 different ways. Depending on your need, > you pick one. > > Option 1 "have an extra translation table" can look something like this > > LANG = T.accepted_language if

[web2py] Re: Proposal to add 'extend' to DIV

2016-10-05 Thread Dave S
On Wednesday, October 5, 2016 at 12:51:59 PM UTC-7, Joe Barnhart wrote: > > One Python helper I find enormously useful is "extend()" as applied to > list objects. Extend differs from append in that it adds the items of the > list provided at the same level as the current list items, thereby

[web2py] Pydal ids customs

2016-10-05 Thread argenio . bosanto
I'm doing a migrate data of 2 databases with diferents tables. My only problems is with ids! table 1 id: 5, name: Diana id: 8, name: Carlos when i migrate this data to databases 2 id: 1, name: Diana id: 2, name: Carlos Look the id's not the same. what is the method to save the same id? I

Re: [web2py] capturing primary key during insert

2016-10-05 Thread Alex Glaros
yes return of primery key works. First time it didn't work but changed code and it does work. Sorry guys, tried to delete my post after it tested correctly but too late. Lack of sleep made me miss the solution. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Proposal to add 'extend' to DIV

2016-10-05 Thread Joe Barnhart
One Python helper I find enormously useful is "extend()" as applied to list objects. Extend differs from append in that it adds the items of the list provided at the same level as the current list items, thereby "extending" the list. An example: body = DIV("this","is","the","body") Result:

Re: [web2py] Setup web2py in Vagrant provision phase

2016-10-05 Thread Marko Seppälä
Hi Richard, Thanks for your reply. Unfortunately your answer is not detailed enough to make it sure that I did everything correctly. I managed to make it work by just adding -batch option to "openssl reg -new ..." command. Also everything seems to work when I ssh to server and try wget to

Re: [web2py] capturing primary key during insert

2016-10-05 Thread Richard Vézina
id = db.SuperObject.insert(**db.SuperObject._filter_fields(form.vars)) Should work, does it? Richard On Tue, Oct 4, 2016 at 5:42 PM, Alex Glaros wrote: > In doing a direct programatic insert without a form such as > db.SuperObject.insert(person_name = "Alex") > > is

[web2py] Re: set individual action's transaction mode

2016-10-05 Thread Niphlod
On Tuesday, October 4, 2016 at 8:18:57 PM UTC+2, Pierre wrote: > > oh great i see > so the two apis speak the same language but they don't communicate ? > they do perfectly integrate: the only way it's possible and the way it's more natural. > never mindbut better be prudent > >