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
You can do this
{{from gluon.serializers import json}}
{{=XML(json(myrows), sanitize=False)}}
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You receive
that can
be used to convert the rows object to JSON?
From: Niphlod
Sent: Tuesday, March 03, 2015 2:36 PM
To: web2py@googlegroups.com
Subject: Re: [web2py] Re: Problems after upgrading to 2.9.12
it should be done in the controller, the view is where you present the data,
not where you transform
it should be done in the controller, the view is where you present the
data, not where you transform it.
anyway, if you want to hurt yourself, you can do
{{import json as myjson}}
{{=myjson.dumps(['a', 'b', 'c', {1: 'x'}])}}
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documen
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, Ma
then, it's exactly as I said: the improper use of response.json.
On Tuesday, March 3, 2015 at 8:59:59 PM UTC+1, naveed wrote:
>
> 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 in
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
uhm. isn't
there
https://github.com/web2py/web2py/blob/master/applications/welcome/views/default/index.html
On Tuesday, March 3, 2015 at 12:09:47 AM UTC+1, naveed wrote:
>
> Looks like it’s caused by this line of code in index.html in the
> welcome app:
>
> {{=(response.json(['foo', {'bar':
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 aft
that's definitely not related to the upgrade. that being said, if you can
show some code with an app that reproduces the issue, I'll be glad to
pinpoint the cause
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https:/
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 re
it's a bug that got fixed.
You used to rely on response.json() to return a string, while it had to
return a javascript object.
Now response.json() sets the content-type header to application/json as it
is supposed to.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
12 matches
Mail list logo