[web2py] Re: legacy database : extract database models

2018-06-01 Thread 黄祥
not sure if this correlated with error traceback: auth.define_tables(...) perhaps should comment auth.define_tables() when using legacy table but for the extract_sqlite_models.py will have an empty result (no table fields defined for all of the tables), solution for now is to use the

[web2py] remove seconds from datetime picker

2018-06-01 Thread Andrea Fae'
When I select from standard calendar a datetime value it adds :00 seconds! But I don't want, I don't need. How to remove from the datetime field? Thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: European General data protection act and web2py

2018-06-01 Thread Massimo Di Pierro
yes. web2py uses cookies by default for sessions. On Friday, 18 May 2018 02:40:58 UTC-5, BlueShadow wrote: > > Hi, > I am using a fairly old version of web2py since the page is running since > 2012 I haven't done many updates. (since I ran into a world of trouble last > time I tried to upgrade

[web2py] Re: sending html emails.... bug ...

2018-06-01 Thread Massimo Di Pierro
Very strange. Can you show us the code to generate the email and the html in the email? On Wednesday, 16 May 2018 11:14:55 UTC-5, Ramos wrote: > > Hello i´m sending html emails but some clients for example google have an > issue with images > > Google is showing this code for the original html

[web2py] Re: legacy database : extract database models

2018-06-01 Thread Massimo Di Pierro
If the table exists than: legacy_db = DAL('sqlite://mutualfunds.sqlite', migrate_enabled = True, fake_migrate_all = True) will create the metadata. if both table and metadata exist than: legacy_db = DAL('sqlite://mutualfunds.sqlite', migrate_enabled = False) should successfully connect if

Re: [web2py] Re: COLLATE UNICODE or COLLATE LOCALIZED in sqlite using DAL

2018-06-01 Thread Junior Phanter
The best solution using SQLITE that I found for my problem https://stackoverflow.com/questions/5492508/ignore-accents-sqlite3 2018-06-01 13:53 GMT-03:00 Junior Phanter : > Thank you Antony. I'm trying to use executesql. > > 2018-06-01 13:04 GMT-03:00 Anthony : > >> You can execute arbitrary SQL

Re: [web2py] Re: COLLATE UNICODE or COLLATE LOCALIZED in sqlite using DAL

2018-06-01 Thread Junior Phanter
Thank you Antony. I'm trying to use executesql. 2018-06-01 13:04 GMT-03:00 Anthony : > You can execute arbitrary SQL via db.executesql(), but I don't think there > is an easy way to add the collate expression to a standard DAL-generated > query (you could generate a SQL string via the

[web2py] Re: COLLATE UNICODE or COLLATE LOCALIZED in sqlite using DAL

2018-06-01 Thread Anthony
You can execute arbitrary SQL via db.executesql(), but I don't think there is an easy way to add the collate expression to a standard DAL-generated query (you could generate a SQL string via the ._select() method and then manipulate it and ultimately pass it to db.executesql()). Would it make

[web2py] COLLATE UNICODE or COLLATE LOCALIZED in sqlite using DAL

2018-06-01 Thread Junior Phanter
how set COLLATE UNICODE or COLLATE LOCALIZED in sqlite using DAL? When I am ordering sharp words, I want him to ignore the accents. I was saving using compute field, names without accent and uppercase to be able to sort, but then db size increases, an alternative would be to sort () doing this

Re: [web2py] Re: query and json-field

2018-06-01 Thread Anthony
Maybe something like this: http://clarkdave.net/2015/03/navigating-null-safety-with-json-and-postgresql/ Anthony On Friday, June 1, 2018 at 8:44:21 AM UTC-4, mweissen wrote: > > Hi Anthony! > > Of course my exaple is very simplified and - sorry - I did not test it. > Now I have found the

[web2py] Re: form fields

2018-06-01 Thread Andrea Fae'
I'm saying thank you Anthony another time...you find every time the right way...my compliments. Tell me...in your opinion what is the best python guide/tutorial (for free or cheap money) to use? What do you suggest? Have a good day. Thank you! Il giorno giovedì 31 maggio 2018 23:32:51 UTC+2,

Re: [web2py] Re: query and json-field

2018-06-01 Thread Martin Weissenboeck
Hi Anthony! Of course my exaple is very simplified and - sorry - I did not test it. Now I have found the solution I have written: query1 = db.sendeprotokoll.typ=="UMF" query1 &= *db*("extra->>'umfragetextid'='4'") r1 = db(query1)._select("sendeprotokoll.typ", "sendeprotokoll.extra")