[web2py] Re: Twinning tables in DAL

2021-12-02 Thread Dave S
On Monday, October 4, 2021 at 5:29:05 AM UTC-7 Anthony wrote: > See > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Table-inheritance > . > > Thank you. /dps > On Saturday, October 2, 2021 at 6:21:42 PM UTC-4 snide...@gmail.com wrote: > >> I need a reminder: >

[web2py] Re: import

2021-12-02 Thread Dave S
On Wednesday, November 17, 2021 at 1:30:31 PM UTC-8 lucas wrote: > hello one and all, > > this is not a web2py question or issue. but, since many are python > experts, i thought i'd ask. > > are there any other ways to import a module or package other then the > "import" or "from...import..."

[web2py] Avoid colnames in executesql

2021-12-02 Thread Jose
I'm migrating an old app that runs in an old version of web2py in python27. In a lot of places I use db.executesql with argument as_dict=True. The error that I am getting is that he asks me to define the colnames que es un nuevo argumento. Sometimes SQL is a query to views and others to stored

[web2py] DataTable() not a function

2021-12-02 Thread Dave S
That's the error I'm getting, according to Chrome's console. The view code is pretty simple: var table; $(document).ready(function(){ table = $('#tableXactions').DataTable( { "data": {{=results}} , "columns": [ /* { data: 'xaction.PostDate'}, */

[web2py] Re: DataTable() not a function

2021-12-02 Thread Dave S
On Thursday, December 2, 2021 at 4:30:20 AM UTC-8 Dave S wrote: > That's the error I'm getting, according to Chrome's console. > > Do I have a conflict between dot-js files? > The view code is pretty simple: > > > var table; > $(document).ready(function(){ >table = $('#tableXactions').Da

[web2py] Re: Avoid colnames in executesql

2021-12-02 Thread Jose
If I do not define colnames I get rows[0]['MyField'] KeyError: 'MyField' El jueves, 2 de diciembre de 2021 a las 9:15:46 UTC-3, Jose escribió: > I'm migrating an old app that runs in an old version of web2py in > python27. In a lot of places I use db.executesql with argument > as_dict=True. T

[web2py] Re: Avoid colnames in executesql

2021-12-02 Thread Jose
Something else if I make select * from myView I get RuntimeError: Result set includes duplicate column names. Specify unique column names using the 'colnames' argument but I do not have duplicate fields El jueves, 2 de diciembre de 2021 a las 11:15:40 UTC-3, Jose escribió: > If I do not def

[web2py] Re: Avoid colnames in executesql

2021-12-02 Thread Jose
I add something. If instead of making select * from MyView I doselect MyField, AnotherFiel from MyView works in this way I create the dictionary with equal keys to the first letter of each field in lowercase [{'m': 6, 'a': 'xx'}] Jose El jueves, 2 de diciembre de 2021 a las 11:30:37 UTC

[web2py] Re: Avoid colnames in executesql

2021-12-02 Thread Jose
The problem is that I had not installed pyodbc (I use MS SqlServer) and I was using some version of the web2py itself. Installing pyodbc works fine El jueves, 2 de diciembre de 2021 a las 11:39:39 UTC-3, Jose escribió: > I add something. If instead of making select * from MyView I doselect >