On Tue, Nov 24, 2009 at 1:10 PM, Mike Burrows (asplake)
<[email protected]> wrote:
>
>
> On Nov 24, 7:39 pm, Mike Orr <[email protected]> wrote:
>> On Tue, Nov 24, 2009 at 10:47 AM, Mike Burrows (asplake)
>> > On a related subject, I'm a little concerned that Pylons has the
>> > choice of constraining methods via Routes (potentially resulting in
>> > 404s which seems wrong to me) or via the @restrict decorator.  IIRC
>> > there's the third choice of a @dispatch decorator but I haven't tried
>> > that (maybe I should - I'm currently using different URLs for my POST
>> > actions).
>>
>> Yes, there are three ways to do it.  I don't know when each one was
>> added to Pylons or why, but I suspect it's because people wanted
>> TurboGears-style decorators.  I'am not sure whether restricting the
>> methods via Routes or the decorators is better, although I lean toward
>> Routes to keep it all in one place.  The security-obsessed would use
>> both. : )
>
> You ok with the 404s then?

It seems like we should just fix Routes then.

http://bitbucket.org/bbangert/routes/issue/18/match-failure-based-on-http-method-should-return-405


>> > Yes it uses standard Rails routes, and no it doesn't address output
>> > formats (nor will it).
>>
>> I'm not sure what this means.  XML, JSON, YAML, and text are all
>> output formats, which it does.
>
> Ah - I just meant that I have no intention to model the formats
> produced by the application.

Ah, of course not.  It can't keep up with every framework's routing convention.

So what do people use their JSON, XML, YAML routemaps for?
Just for display?

I also added a couple tickets for a routemap pretty printer and
"paster describe_routes".

http://bitbucket.org/bbangert/routes/issue/16/routemap-pretty-printer

http://pylonshq.com/project/pylonshq/ticket/661




-- 
Mike Orr <[email protected]>

--

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