Ok i finally got it.
If you want to bypass the ticket system and display the errors directly on 
the page you are working on, follow these steps:

1.-Install mechanize <http://wwwsearch.sourceforge.net/mechanize/> which it 
is a library that automates webforms.

2- Redirect the errors to a custom controller in any application:
Edit routes.py and add:
routes_onerror = [(r'*/*', r'/myapp/index/errors')]
so myapp has a controller with a function called "errors" which will handle 
the error request

Edit myapp/controllers/index.py and add the errors function.
def errors():
    ticket = request.vars.ticket
    url = "http://127.0.0.1:8000/admin/default/ticket/"; + ticket

    import mechanize
    br = mechanize.Browser()
    br.open(url)
    br.select_form(nr=0)
    #administrator password to enter the admin area
    br['password'] = "1234"
    res = br.submit()
    content = res.read()
    return content

Finally reload routes by clicking reload routes at admin area or restarting 
the rocket server.

And thats it. You will be able to see the tickets at the same page you are 
working on without having to navigate to the admin area or refresh your 
page if you use 
LiveReload<https://addons.mozilla.org/en-US/firefox/addon/livereload/>
.

Note that this trick should be only used in development.
Let me know if it helps or if you have any doubts.

Thanks.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to