-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathErrorPage.py
More file actions
22 lines (18 loc) · 789 Bytes
/
Copy pathErrorPage.py
File metadata and controls
22 lines (18 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- coding: latin-1 -*-
import cgitb
cgitb.enable()
import cgi
from WebPage import WebPage
class ErrorPage(WebPage):
'''Error page is triggered by except, present in every cgi file.
Prints error message and a "Back" Button.'''
def printBody(self):
print "<h1>"
print "An error has occured :("
print "</h2>"
print """<p> The server encountered an error,
most likely due to invalid data entered in the link field
or unsupported characters</p>"""
print "<p> Go back and try again. </p>"
print """<form class = 'BackButtonMemberList' action = 'index.cgi'
method = 'get'> <input type = 'submit' value = 'Back'></form>"""