[web2py] Re: After update 2.9.12, response.json is messing the screen

2015-01-21 Thread André Kablu
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

[web2py] Re: After update 2.9.12, response.json is messing the screen

2015-01-21 Thread Niphlod
pretty undocumented feature (so its not a bug per se) response.json() is clearly NOT meant to be used in views just use json(whatever) instead. on the can I call it a bug of not matter, that seems to surface every once in a while, please take the following as a word of caution (from

Re: [web2py] Re: After update 2.9.12, response.json is messing the screen

2015-01-21 Thread Kablu®
I was expecting someone tell me that I am using it wrong :) Since it was there and I was using it (wrong or not) for past 2 years... I was not expecting its behavior to change... And I always consider testing my apps with trunk... bug I was focusing tests on DAL... sometimes we don`t have much

Re: [web2py] Re: After update 2.9.12, response.json is messing the screen

2015-01-21 Thread Niphlod
On Wednesday, January 21, 2015 at 9:36:09 PM UTC+1, André Kablu wrote: I was expecting someone tell me that I am using it wrong :) Since it was there and I was using it (wrong or not) for past 2 years... I was not expecting its behavior to change... And I always consider testing my apps