Thank you, I tried this:
db.executesql("""set @num := 0, @type := '';
select type, variety, price
from (
select type, variety, price,
@num := if(@type = type, @num + 1, 1) as row_number,
@type := type as dummy
from fruits
order by type, price
Yes it works from the DB’s interface and yes, I’m using MySQL.
From: Brian M
Sent: Wednesday, March 11, 2015 3:18 PM
To: web2py@googlegroups.com
Subject: Re: [web2py] Re: Running multiple lines of SQL in executesql
Strange. Does that same query work if you enter it directly in your DB's
interf
This helps a lot, thank you.
From: Leonel Câmara
Sent: Tuesday, March 03, 2015 2:53 PM
To: web2py@googlegroups.com
Subject: [web2py] Re: Problems after upgrading to 2.9.12
You can do this
{{from gluon.serializers import json}}
{{=XML(json(myrows), sanitize=False)}}
--
Resources:
- http://w
Thanks. I did go along this path, but I was trying to use a database rows
object, I need to iterate through it in the view, but javascript needs to
iterate through it as well. The response json method works well for this, but
as you mention it’s not a response. Is there a similar web2py method t
Ok, how do I convert a python object to a json object in the view?
From: Niphlod
Sent: Tuesday, March 03, 2015 2:10 PM
To: web2py@googlegroups.com
Subject: Re: [web2py] Re: Problems after upgrading to 2.9.12
then, it's exactly as I said: the improper use of response.json.
On Tuesday, March 3,
Sorry, I should have been more clear. It’s caused by adding the line
{{=(response.json(['foo', {'bar': ('baz', None, 1.0, 2)}])) }}
in to the existing index.html
From: Niphlod
Sent: Tuesday, March 03, 2015 4:21 AM
To: web2py@googlegroups.com
Subject: Re: [web2py] Re: Problems after upgrading
Looks like it’s caused by this line of code in index.html in the welcome app:
{{=(response.json(['foo', {'bar': ('baz', None, 1.0, 2)}])) }}
From: Niphlod
Sent: Monday, March 02, 2015 1:56 PM
To: web2py@googlegroups.com
Subject: Re: [web2py] Re: Problems after upgrading to 2.9.12
that's def
Makes sense for the json response, but why is the index which uses an html view
returning as json?
From: Niphlod
Sent: Monday, March 02, 2015 2:41 AM
To: web2py@googlegroups.com
Subject: [web2py] Re: Problems after upgrading to 2.9.12
it's a bug that got fixed.
You used to rely on response.jso
I wasn’t asking as how to encrypt the file itself, but how to incorporate it in
to web2py’s existing excellent form upload and download system. Assuming that
we have functions encrypt(file, password) and decrypt(file, password) which
return the encrypted and decrypted file respectively.
From:
Thanks Massimo for getting back. I can’t use an encrypted file system as when
the file system is mounted, it’s totally open. Every file can be encrypted with
the same master password. I’m thinking of storing this master password which is
itself encrypted using the user’s password (or it’s hash)
I worked around it using this:
{{is_mobile=request.user_agent().is_mobile and not
request.user_agent().is_tablet}}
in layout.html
Naveed
From: Anthony
Sent: Tuesday, April 03, 2012 08.45
To: web2py@googlegroups.com
Subject: Re: [web2py] Prevent mobile rendering on iPad/Tablets
Any future
Thanks, I didn’t think of that. This will help.
From: Martín Mulone
Sent: Thursday, January 26, 2012 06.17
To: web2py@googlegroups.com
Subject: Re: [web2py] Change the case in auth.navbar?
Remember you can do it with css:
.auth_navbar a {
text-transform:capitalize;
}
I agree.
From: Anthony
Sent: Wednesday, January 25, 2012 18.54
To: web2py@googlegroups.com
Subject: Re: [web2py] Change the case in auth.navbar?
Yeah, that's why we should probably just make it configurable. :-)
On Wednesday, January 25, 2012 7:46:39 PM UTC-5, ニコノコ wrote:
Hmm ... if one is
13 matches
Mail list logo