[web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-12 Thread 'Awe' via web2py-users
Hello Leonel, thanks for analyzing. Will open issue today. Andreas Am Freitag, 9. März 2018 16:55:12 UTC+1 schrieb Leonel Câmara: > > This is definitely a bug, the solution doesn't seem easy, The problem is > that it should not apply the common filters on the alias used on the left > join again

Re: [web2py] Re: prevent multiple session at the same time

2018-03-12 Thread Manuele Pesenti
Il 07/03/18 15:51, Anthony ha scritto: > Be aware, that will require a database select on every request. If you > want to minimize the database hits, you could also store in the > session the time of the last database lookup, and then only check the > database every X minutes (the tradeoff being

[web2py] Re: Issue with defaultdict(list)

2018-03-12 Thread Leonel Câmara
This controller worked fine for me: def test(): from collections import defaultdict g = defaultdict(list) g['somekey'].append('somevalue') return response.json(g) You probably have a bug in your view. You can show us the code if you want. -- Resources: - http://web2py.com -

Re: [web2py] Re: prevent multiple session at the same time

2018-03-12 Thread Anthony
On Monday, March 12, 2018 at 7:23:26 AM UTC-4, Manuele wrote: > > Il 07/03/18 15:51, Anthony ha scritto: > > Be aware, that will require a database select on every request. If you > > want to minimize the database hits, you could also store in the > > session the time of the last database

[web2py] Re: bootstrap very bad

2018-03-12 Thread Andrea Fae'
Il giorno lunedì 12 marzo 2018 20:04:57 UTC+1, Andrea Fae' ha scritto: > > Hello, Why I have very bad format in the dialog and in the forms? label is > not on the lef of the field and all is white colourhow to change? Look > attached file... > response.formstyle = 'bootstrap4_inline'

[web2py] bootstrap very bad

2018-03-12 Thread Andrea Fae'
Hello, Why I have very bad format in the dialog and in the forms? label is not on the lef of the field and all is white colourhow to change? Look attached file... thanks you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Issue with defaultdict(list)

2018-03-12 Thread Leonel Câmara
Drew most likely what's happening is a variation of this g = defaultdict(list) g['foo'] = {'id': 1} # this could be any dictionary g['foo'].append('someValue') AttributeError: 'dict' object has no attribute 'append' Note that defaultdict only gives you the default if the key doesn't have a

[web2py] 'FieldVirtual' object has no attribute 'listable'

2018-03-12 Thread Andrea Fae'
I don't know because I'm sure mounths ago it was working... form = SQLFORM.grid(query, args=[studente], fields=[db.evento.titolo, db.evento.ricorrenza, db.evento.giorno_inizio, db.evento.inizio, db.evento.fine, db.evento.risorsa, db.evento.materia,

[web2py] Re: Issue with defaultdict(list)

2018-03-12 Thread Drew Howell
I am running from source, but still seem to have the issue. On Monday, March 12, 2018 at 1:55:51 AM UTC-4, Val K wrote: > > Hi! > If you're Windows user it's requires to run web2py from source (not > web2py.exe) to get modules that are installed on your machine I was doing some testing and

[web2py] Re: Issue with defaultdict(list)

2018-03-12 Thread Drew Howell
I think I've narrowed it down to having an error somewhere in my 'students' controller. 1. If I remove all other functions within that controller, it works. 2. If I create a new controller and only have that function, it works. 3. If I put the same exact code in another existing

[web2py] Re: DAL query CONVERT field

2018-03-12 Thread Leonel Câmara
In the trunk pyDAL version this should be possible: db(db.table1.field1.cast('text').like('%somestring%')).select(db.table1.ALL) While that's not available: from pydal.objects import Expression dialect = db._adapter.dialect db(Expression(db, dialect.cast, db.table1.field1,

[web2py] web2py debugger breakpoint works once only in 2.16.1

2018-03-12 Thread David Manns
This can be demonstrated with the welcome app. Start web2py Display the admin page, go into debug, breakpoints and set breakpoint on line 9 of the welcome app default.py Launch the welcome page - the breakpoint is hit. Click continue ... the welcome page displays The admin/breakpoint page

[web2py] DAL query CONVERT field

2018-03-12 Thread Omicron VT
Is possible to create a query in DAL to obtain this ? SELECT * FROM table1 WHERE CONVERT(VARCHAR, field1) LIKE '%somestring%' where field1 is an INT type field ? Thanks in advance. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: 'FieldVirtual' object has no attribute 'listable'

2018-03-12 Thread icodk
Try to make the virtual field writable=False On Monday, March 12, 2018 at 9:04:07 PM UTC+1, Andrea Fae' wrote: > > I don't know because I'm sure mounths ago it was working... > > > form = SQLFORM.grid(query, args=[studente], fields=[db.evento.titolo, > db.evento.ricorrenza,