On Mar 27, 1:37 pm, askel <[email protected]> wrote:
> Original poster says he wants to avoid NotImplementedError exception
> which only happens in debug mode instead of returning 404.

True, but he also mentioned users, so I guessed that he might not have
known that he'd get a 404 instead of a NotImplementedError in
production mode. Either way, there's a solution somewhere in this
thread. ;)



> On Mar 25, 4:27 pm, Wyatt Baldwin <[email protected]> wrote:
>
> > On Mar 25, 11:06 am, askel <[email protected]> wrote:
>
> > > Edgar,
>
> > > I'd define controller's __getattr__ method and return some dummy
> > > action as following:
>
> > > def _dummy_action(self):
> > >   ...
>
> > > def __getattr__(self, name):
> > >   return self._dummy_action
>
> > > It will catch all other non-existant attribute requests but this is
> > > probably simpliest working solution.
>
> > Unless returning the usual 404 page is acceptable, in which case you
> > don't need to do anything (except create your own 404 page).
--~--~---------~--~----~------------~-------~--~----~
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