Re: jsonify validator

2009-09-23 Thread Hans Lellelid
Hi - On Sep 23, 2009, at 1:36, Qiangning Hong wrote: > > On Wed, Sep 23, 2009 at 1:17 PM, Mike Orr > wrote: >> >> On Tue, Sep 22, 2009 at 8:06 PM, Jonathan Vanasco > > wrote: >>> >>> by default it sets response.content_type to "application/json" >>> >>> is there a way to override this? >>> i

Re: jsonify validator

2009-09-23 Thread Qiangning Hong
On Wed, Sep 23, 2009 at 7:03 PM, Hans Lellelid wrote: > Actually, for some browsers, json-rpc reqs simply will not work unless > the content type is something more "texty".  In these cases, it is not > a question of making it easier to debug (if anything, I think you'd > want it to be wrong for p

Re: jsonify validator

2009-09-23 Thread Shailesh Kochhar
Mike Orr wrote: > On Tue, Sep 22, 2009 at 8:06 PM, Jonathan Vanasco > wrote: >> by default it sets response.content_type to "application/json" >> >> is there a way to override this? >> if not , could I request this in a future version of pylons ? >> >> though testing, i discovered that a lot of

Re: jsonify validator

2009-09-23 Thread Shailesh Kochhar
Qiangning Hong wrote: > On Wed, Sep 23, 2009 at 1:17 PM, Mike Orr wrote: >> On Tue, Sep 22, 2009 at 8:06 PM, Jonathan Vanasco >> wrote: >>> by default it sets response.content_type to "application/json" >>> >>> is there a way to override this? >>> if not , could I request this in a future versi

Re: jsonify validator

2009-09-23 Thread Mike Orr
On Tue, Sep 22, 2009 at 10:36 PM, Qiangning Hong wrote: > > On Wed, Sep 23, 2009 at 1:17 PM, Mike Orr wrote: >> >> On Tue, Sep 22, 2009 at 8:06 PM, Jonathan Vanasco >> wrote: >>> >>> by default it sets response.content_type to "application/json" >>> >>> is there a way to override this? >>> if

Re: jsonify validator

2009-09-23 Thread Wyatt Baldwin
On Sep 23, 9:47 am, Shailesh Kochhar wrote: > > [snip] > > If you're debugging a url and want to see the response in a browser, firefox > has > a plugin called JSONView which renders JSON data nicely. > > https://addons.mozilla.org/en-US/firefox/addon/10869/ Nice (pro)tip. Thank you. I have a t

repoze.what pylons quickstart question

2009-09-23 Thread Iain Duncan
Hi folks, apologies for the cross post, I posted this on the repoze list but didn't get any solutions, so I'll try here. I'm using the repoze.what pylons quickstart code, and I'm having problems with the fact that when @protect_action fails, it tries to call the login action *for the current cont

Routing to controllers in subdirectories

2009-09-23 Thread Tom B
Hi I'm very new to pylon (1 week) and I've got stuck and hope some kind expert can lend a guiding hand. What I want to do is place certain controllers in a subdirectory to keep my code nice and organised. I want to have a subdirectory in my controllers catalog called services, where I gather all

Re: Routing to controllers in subdirectories

2009-09-23 Thread Mike Orr
On Wed, Sep 23, 2009 at 1:00 PM, Tom B wrote: > > I need to get at the routing to do some fancy stuff. When I alter the > routing to the following: > map.connect('/services/foo/bar', controller='services.foo', > action='bar') I've heard that controller='services/foo' works. -- Mike Orr --~--

Re: Routing to controllers in subdirectories

2009-09-23 Thread Tom Blackmore
Thanks Mike works like a dream. 2009/9/23 Mike Orr > > On Wed, Sep 23, 2009 at 1:00 PM, Tom B wrote: > > > > I need to get at the routing to do some fancy stuff. When I alter the > > routing to the following: > > map.connect('/services/foo/bar', controller='services.foo', > > action='bar') > >

Re: jsonify validator

2009-09-23 Thread Jonathan Vanasco
Thanks for the suggestions folks. A lot of those things are magical too. I'm really thinking/hoping along the lines of something like OPTIONALLY putting a line in dev.ini that can be used to set the content-type. All the plugins, etc are neat... but honestly I don't want to install plugins. I

Re: jsonify validator

2009-09-23 Thread Mike Orr
On Wed, Sep 23, 2009 at 5:27 PM, Jonathan Vanasco wrote: > > Thanks for the suggestions folks. > > A lot of those things are magical too. > > I'm really thinking/hoping along the lines of something like > OPTIONALLY putting a line in dev.ini that can be used to set the > content-type. Jsonify is

Re: pylons with chameleon?

2009-09-23 Thread Iain Duncan
In Sat, 2009-09-19 at 09:40 +0200, Wichert Akkerman wrote: > On 2009-9-16 21:06, Iain Duncan wrote: > > > > Hi folks, I have not built enough pylons to be know how to switch > > templating languages beyond mako and genshi, but I'm interested in using > > Chameleon. Has anyone got any examples up o