Default to default_exceptionresponse_view for add_notfound_view and add_forbidden_view #494

Closed
domenkozar opened this Issue Mar 17, 2012 · 7 comments

Comments

Projects
None yet
3 participants
Member

domenkozar commented Mar 17, 2012

Currently, to achieve django-like APPEND_SLASH, I do:

from pyramid.httpexceptions import default_exceptionresponse_view

...

config.add_notfound_view(default_exceptionresponse_view, append_slash=True)

It would be nice if those two views had a default value, in case developer want's to change only matching behavior. What do you think? :)

Owner

mcdonc commented Mar 17, 2012

Can you describe the API we should expose to let people change the append_slash but use the default exception view?

Member

domenkozar commented Mar 17, 2012

Can we make it default, if view parameter is not specified to add_notfound_view?

Owner

mcdonc commented Mar 17, 2012

Probably. There is precedent for this in add_view: you can pass None as a view and it will create one that returns an empty dict on the fly as long as you specify a renderer.

Owner

mcdonc commented Sep 16, 2012

@iElectric i'm lazy.. do you want to supply a patch for this?

Member

domenkozar commented Sep 17, 2012

I'll come to it eventually :)

Owner

mmerickel commented Aug 20, 2013

bump?

Member

domenkozar commented Aug 20, 2013

Uh-oh, totally forgot about this one. Putting it on todo stack.

domenkozar closed this Dec 12, 2013

mmerickel added this to the 1.6 milestone Feb 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment