Here is the reason why:

Before 2.9.12 it was (globals.py):

def json(self, data, default=None):
 return json(data, default=default or custom_json)



Now it is:

def json(self, data, default=None):
 if 'Content-Type' not in self.headers:
 self.headers['Content-Type'] = 'application/json'
 return json(data, default=default or custom_json)






On Wednesday, January 21, 2015 at 5:04:31 PM UTC-2, André Kablu wrote:
>
> Hi all,
>
> I just updated one of my projects to 2.9.12 and after that all views that 
> have a code like this does not work:
>
> SCRIPT('somecode(' + response.json + ')')
>
> the response.json is changing the content-type of the page to json...
>
> if we use:
>   return response.json
>
> there will be no problem,
>
> but when we use response.json as part of another string, it will transform 
> content-type to json.... messing the view...
>
> Think we need to fix that...
>
> Thanks!
>
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to