Im gonna try to explain it better.
I have an application with a controller that has a function that produces
an error. ex: myapp/default/index
on routes.py im redirecting the errors to otherapp/default/display_errors
to watch the ticket i have to go to
"http://localhost:8000/admin/default/ticket/myapp/127.0.0.1.2014-05-01.07-54-28.fad8beec-c539-4243-b7bb-116ce76cc39c"
i would like otherapp/default/display_errors to return the same response
as that url
Ive tried many things like, none of them are working very well.
def display_errors():
import urllib
resp =
urllib.openurl("http://localhost:8000/admin/default/ticket/myapp/127.0.0.1.2014-05-01.07-54-28.fad8beec-c539-4243-b7bb-116ce76cc39c"")
return resp.read()
it returns the admin login page, does not work.
app = request.application
myversion = request.env.web2py_version
ticket = request.vars.ticket.split("/")[1]
from gluon.restricted import RestrictedError
e = RestrictedError()
e.load(request, app, ticket)
return response.render("default/ticket.html", dict(app=app,
ticket=ticket,
output=e.output,
traceback=(e.traceback,), # and TRACEBACK(e.traceback)),
snapshot=e.snapshot,
code=e.code,
layer=e.layer,
myversion=myversion))
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.