web.ctx is populated at request time and you're trying to use it
outside of a request cycle -- that code runs when the server is
started.  Probably what you want:

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

def new_404():
    raise web.notfound("Page Not Found at " + web.ctx.path)

app.notfound = new_404


-Justin

On Oct 6, 3:38 am, Akshay Shekher <[email protected]> wrote:
> i use web.ctx.home in my views functions and it works fine but when i use it
> like
>
> def notfound_cust():
>     return "Page Not Found at "+ web.ctx.home
> web.notfound = notfound_cust()
>
> it shows..
> AttributeError: 'ThreadedDict' object has no attribute 'home'

-- 
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