[web2py] SQL grid groupby work around using posgres

2019-02-25 Thread 'Matthew J Watts' via web2py-users
Hi all I have recently moved from SQLite to Postgres, I've had to change all the 'groupby' to 'distinct'. However, I'm also using the 'groupby; command in the SQLgrids, but this does not have a distinct option. Does anyone know of a workaround? Example code below def re_standardise_taxon():

Re: [web2py] sqlform double representation

2019-02-25 Thread Ben Duncan
On the first ...: 1.255,76is invalid as there are no commas AFTER decimal places. As far as the latter, I am not sure. Could be a Python thing ... *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Sat, Feb 23, 2019 at 9:48 PM Cristian Re w

Re: [web2py] Re: 2.18.1 is OUT

2019-02-25 Thread Ben Duncan
Errors on redhat 7, Python 2.7.13: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed j

[web2py] Convert ASSIGNJS row to javascript dict

2019-02-25 Thread Ben Duncan
I have this code: Company_List = \ db(db.company.company_number > '0').\ select(db.company.company_number,db.company.company_name,\ orderby=db.company.company_number) Which when passed ot ASSIGNJS creates this list: var myargs = [{"company_number": 2, "company_name": "Th

Re: [web2py] Re: 2.18.1 is OUT

2019-02-25 Thread Carl Petersen
Agreed, download link is currently broken. On Monday, February 25, 2019 at 12:38:01 AM UTC-6, Lovedie JC wrote: > > Having trouble with download page: > See attached. > > On Mon, 25 Feb 2019 at 07:57, Alex Glaros > wrote: > >> am on Windows >> >> -- >> Resources: >> - http://web2py.com >> - htt

Re: [web2py] Re: creating a db table doesn't actually create a table (sqllite)

2019-02-25 Thread Eliezer (Vlad) Tseytkin
The following tables have been created: ..._auth_cas.table ..._auth_event.table ..._auth_group.table ..._auth_membership.table ..._auth_permission.table ..._auth_user.table and work just fine. Now, I created the table 'inquiry'. When the code that creates it is located in mini-site.py (in models

[web2py] Re: Convert ASSIGNJS row to javascript dict

2019-02-25 Thread Leonel Câmara
What do you mean? You already have a javascript array of javascript dicts. If you only need a specific index just access it in javascript with myargs[0] or myargs[1]. I may be misunderstanding what you're trying to do. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

Re: [web2py] Re: Convert ASSIGNJS row to javascript dict

2019-02-25 Thread Ben Duncan
I don't want the array, just the dictionary *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Mon, Feb 25, 2019 at 11:17 AM Leonel Câmara wrote: > What do you mean? You already have a javascript array of javascript dicts. > If you only ne

[web2py] error while reading browser cookies

2019-02-25 Thread Vlad
This is the first time I am trying to use the cookies. Following the appropriate section in the book, here is the line: *if request.cookies.has_key('test_cookie'):* it causes the following error: 'SimpleCookie' object has no attribute 'has_key' what am I missing? -- Resources: -

Re: [web2py] Re: standalone templates

2019-02-25 Thread Carlos Cesar Caballero Díaz
Hi Massimo,sorry about the delay in responding, I was really busy last week. There is a small example of what we get right now (now using yatl) https://github.com/daxslab/mojito BTW the new helpers and refactored code looks much better. Greetings. El 18/2/19 a las 1:49 p.m., Massimo Di Pierro

[web2py] Re: Convert ASSIGNJS row to javascript dict

2019-02-25 Thread Leonel Câmara
Well then don't give ASSIGNJS all those rows, because that's a list of companies. You can also put the list of companies inside a javascript dictionary ASSIGNJS(myargs= {'company_list': Company_List}) is this what you want? If you tell me what you're trying to achieve it would be easier to ex

Re: [web2py] Re: Convert ASSIGNJS row to javascript dict

2019-02-25 Thread Ben Duncan
Ok thanks: Looking to pass to the javascript something like this: { 2: "Third Company", 5: "Number 5 Company", 13: "Lucky 13 Company"} It is to create a selection list that returns the number (2, 5, 13 ,etc ...) but shows the company name Thanks *Ben Duncan* DBA / Chief Software Architect Mis

[web2py] Re: Convert ASSIGNJS row to javascript dict

2019-02-25 Thread Leonel Câmara
Got it, for that I would suggest using a dictionary comprehension ASSIGNJS(myargs= {c.company_number:c.company_name for c in Company_List}) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2p

[web2py] Re: error while reading browser cookies

2019-02-25 Thread Vlad
Never mind... It's the difference between Python 2 and Python 3. The books needs to be updated with the latest. On Monday, February 25, 2019 at 12:45:02 PM UTC-5, Vlad wrote: > > This is the first time I am trying to use the cookies. Following the > appropriate section in the book, here is the

[web2py] Re: 2.18.1 is OUT

2019-02-25 Thread Yi Liu
A python 3 bug: 'dict' object has no attribute 'iteritems' Version web2py™ Version 2.18.1-stable+timestamp.2019.02.24.06.24.15 Python Python 3.7.2: /Users/LaVie/.pyenv/versions/miniconda3-4.3.11/bin/python (prefix: /Users/LaVie/.pyenv/versions/miniconda3-4.3.11) Traceback 1. 2. 3. 4. 5. 6.

Re: [web2py] 2.18.1 is OUT

2019-02-25 Thread Ovidio Marinho
testing [image: http://itjp.net.br] http://itjp.net.b r *Ovidio Marinho Falcao Neto* ovidio...@gmail.com Brasil Em dom, 24 de fev de 2019 às 03:32, Massimo

Re: [web2py] 2.18.1 is OUT

2019-02-25 Thread 黄祥
not sure about the download page problem, but tested with cli run well cd curl -O http://web2py.com/examples/static/web2py_src.zip unzip ./web2py_src.zip best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

Re: [web2py] Re: creating a db table doesn't actually create a table (sqllite)

2019-02-25 Thread Anthony
We can probably change this, but web2py will ignore files with hyphens in the name (it uses a regex with \w to match file names). Note, at least for packages and modules, PEP 8 recommends only lowercase letters and underscores

Re: [web2py] Re: creating a db table doesn't actually create a table (sqllite)

2019-02-25 Thread Eliezer (Vlad) Tseytkin
Got it, thank you! On Mon, Feb 25, 2019, 8:22 PM Anthony wrote: > We can probably change this, but web2py will ignore files with hyphens in > the name (it uses a regex with \w to match file names). Note, at least > for packages and modules, PEP 8 >

Re: [web2py] Re: standalone templates

2019-02-25 Thread Massimo Di Pierro
nice work. Have you used it with pydal? On Monday, 25 February 2019 10:04:43 UTC-8, Carlos Cesar Caballero wrote: > > Hi Massimo, sorry about the delay in responding, I was really busy last > week. There is a small example of what we get right now (now using yatl) > https://github.com/daxslab/mo