Re: Adding "abort" and "redirect" to Pyramid

2011-05-16 Thread Chris Withers
On 16/05/2011 19:46, Michael Merickel wrote: I really don't like the idea of the abort(404) API providing no way to provide a custom 404 page, I don't think anything Chris has said suggests you wouldn't be able to provide a customer 404 page... that's why I mention marrying the two. And cal

How do I develop a Pylons package?

2011-05-16 Thread Chris Withers
Hi All, I'm looking for the equivalent of the following: http://packages.python.org/testfixtures/development.html ...for Pylon project packages. In short, for any package, what's the "right" way to: - get a development environment ready including setting up a virtualenv, installing the pack

Re: Adding "abort" and "redirect" to Pyramid

2011-05-16 Thread Chris Withers
On 16/05/2011 19:42, Stephen Lacy wrote: design. I'm not fond of thinking of things like access violations as "exceptions". Oh, I very much am. It's much easier and more powerful to, at any point, raise a "whoa, you're not allowed to do that!" exception, and not have to worry about all the i

Re: Adding "abort" and "redirect" to Pyramid

2011-05-16 Thread Michael Merickel
I really don't like the idea of the abort(404) API providing no way to provide a custom 404 page, that's why I mention marrying the two. And calling it abort(404) in no way implies that this is different from NotFound. -- You received this message because you are subscribed to the Google Groups

Re: Adding "abort" and "redirect" to Pyramid

2011-05-16 Thread Stephen Lacy
This whole discussion (and current implementation of returns or raises for httpexceptions) seems to violate the Zen of Python: "There should be one-- and preferably only one --obvious way to do it." Chris, what's the root issue that made you think that "return abort(401)" would be a better API tha

Re: Adding "abort" and "redirect" to Pyramid

2011-05-16 Thread Chris Withers
On 16/05/2011 18:58, Tres Seaver wrote: On 05/16/2011 02:27 AM, Chris McDonough wrote: I've created a branch named "httpexception-utils" on GitHub which contains an implementation of "redirect" and "abort" for Pyramid that act like their Pylons brethren. In short, the abort feature is used like

Re: Adding "abort" and "redirect" to Pyramid

2011-05-16 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/16/2011 02:27 AM, Chris McDonough wrote: > I've created a branch named "httpexception-utils" on GitHub which > contains an implementation of "redirect" and "abort" for Pyramid that > act like their Pylons brethren. > > In short, the abort featur

Re: Adding "abort" and "redirect" to Pyramid

2011-05-16 Thread Chris McDonough
On Mon, 2011-05-16 at 11:42 -0500, Michael Merickel wrote: > Is there any support for integrating "abort(404)" with "raise > NotFound" such that my 404 is rendered properly? Same with > "abort(403)" and Forbidden. No, except in the docs I explain the difference between NotFound and HTTPNotFound an

Re: Adding "abort" and "redirect" to Pyramid

2011-05-16 Thread Michael Merickel
Is there any support for integrating "abort(404)" with "raise NotFound" such that my 404 is rendered properly? Same with "abort(403)" and Forbidden. I'm a little torn but more in favor of the readability of using httpexceptions directly. -- You received this message because you are subscribed to