If version 0.3, notfound is a method on the application:

app = web.application(urls, globals())
app.notfound = newnotfound

Also, you're responsible for setting the status when you redefine the
not found.  It should probably look like this:

def newnotfound():
    web.ctx.status = "404 Not Found"
    return "MY NOT FOUND"

-Justin

On Oct 11, 1:31 am, Paul <[EMAIL PROTECTED]> wrote:
> ---------- Forwarded message ----------
>
> Date: Jun 2, 4:29 pm
> Subject: web.py 0.3 notfound
> To: web.py
>
> What is the right way of doing custom 404 not founds?
>
> this does not work:
>
> def newnotfound():
>     return 'MY NOT FOUND'
> web.webapi.notfound=newnotfound
>
> If i do this, I get an error that says an argument is passed to the
> function newnotfound, what is that argument?
>
> web.application.notfound=newnotfound
>
> what is the correct way to do this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to