On 4 mar, 13:03, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> this is straightforward:
>
> i- if i call /:controller/:action and :action is undefined, i get
> <type 'exceptions.NotImplementedError'>: Action u'abcdefg' is not
> implemented
> How do i push things like that to a 404 instead? I can't find that
> in the docs.
Your don't, your getting this because your in debug mode.
Setting "debug = false" will stop the ErrorHandler middleware helping
you and return 404.
> ii- semi related -- shouldn't controllers/template.py have something
> like
> def index(self):
> self.view(None)
I'm not sure i get your self.view here. I'm not aware controllers have
view attributes,
maybe you mean: render('yourtemplate')
> or some sort of routing done that will handle not having an index
> (ie , section 1 )?
> off the default template, if i hit /template i get an error... i
> feel like it shouldn't call the template controller in that case, or
> at the least not try and call the index
If you dont want an index, simply dont write an index action ;-)
Good luck,
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---