5

When developing a web2py application, its pretty normal to have various syntax errors, db issues and such.

However, when debugging these problems (in a non production system), a ticket link is presented by default, instead of the actual ticket.

Is there a way to auto redirect to the actual ticket , eliminating the need to click (and wait for the actual ticket to load)?

Tom Feiner
  • 20,656
  • 20
  • 48
  • 51

1 Answers1

5

Try adding something like the following to your /web2py/routes.py file:

error_message_ticket='''
  <html><head>
    <script language="javascript">
      location.replace("/admin/default/ticket/%(ticket)s")
    </script>
    <!-- this is junk text else IE does not display the page: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //-->
  </head></html>'''

For more details, see Routes on Error in the online book.

Anthony
  • 25,466
  • 3
  • 28
  • 57