Page Source
from utils.display.ssdisplay import StaticStringDisplay
from utils.controls import sscontrol
from utils.display import Arguments
import debugging
# This class displays multiple static strings
#
# http://www.cs.uchicago.edu/info/services/imap
# displays the default static string imap
#
#
# http://www.cs.uchicago.edu/info/services/imap/abc
# displays the static string imap_abc
#
class MyStaticStringDisplay(StaticStringDisplay, Arguments):
tab = "info"
title="CS IMAP Configuration Pages"
needs_args=1
def permit_mode(self,mode):
return 1 # Allow everybody to see the contents of this page
# Get the 2cnd half of the static string name, if none 'top' is default
def process_arguments(self):
self.args = self.parse_arguments(argnames=[('option','top')])
# Build name of static string to display
def make_page(self,page):
self.process_arguments()
self.key = "imap_"+self.args['option']
StaticStringDisplay.make_page(self,page)
def new(req):
return MyStaticStringDisplay(req)