Sorry, I missed the followups when I answered just now.

> Anyone in the room using the "format" option against non-view actions?

Yes, my current project allows view, create and update in json in
several places where html is the default.  There's a discussion about
how I did it  (with a skeleton update action) in this previous thread:
http://groups.google.com/group/pylons-discuss/browse_thread/thread/927f4367d5367fc2

Regards,
Mike


On May 8, 7:22 am, Alexandre Conrad <[email protected]>
wrote:
> Hi Mike,
>
> 2010/5/8 Mike Orr <[email protected]>:
>
> > The routes created by map.resource include a 'formatted_*' route
> > alongside each regular route. The formatted routes have a '.FORMAT'
> > suffix at the end of the URL; e.g., /articles/1234.xml, which you can
> > access via the 'format' routing variable. This allows you to return
> > the data in an alternate format.  Of course, your action would have to
> > support those formats or abort(404) if it doesn't. I don't know what
> > editing in XML format would mean, or whether multi-formats makes sense
> > for any action besides view. But if you had a web service that could
> > accept either JSON or XML or other formats, it might work for that.
>
> Thanks a lot. I'm glad you figured out I was talking about
> map.resource (and paster restcontroller), I forgot to mention it.
>
> I see, then maybe "format" would be specified to tell Pylons that the
> POST'ed request should be treated as XML/JSON input data. Or something
> like that...
>
> Anyone in the room using the "format" option against non-view actions?
>
> --
> Alex
> twitter.com/alexconrad
>
> --
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/pylons-discuss?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to