Option definition store
option=maximumImageSize
displayName=Maximum image size?
type=ByteSize
unit=kb
defaultValue=100
maxValue=10000
Option store
maximumImageSize=100
Option semantics
class ByteSizeOption(IntegerOption):
   def printEditControl(self):
       IntegerOption.printEditControl(self)
       print self.getUnitAbbreviation()

   def getUnitAbbreviation(self):
       return self.unit
+User interface
class ConfigurationCGI(BaseCGI):

     def processRequest():
         ...

Configuration framework
Maximum image size? kb

This document (source) is part of Crummy, the webspace of Leonard Richardson (contact information). It was last modified on Tuesday, April 13 2004, 00:17:26 Nowhere Daylight Time and last built on Monday, August 20 2007, 17:01:00 Nowhere Daylight Time.

Crummy is © 1996-2007 Leonard Richardson. Unless otherwise noted, all text licensed under a Creative Commons License.

Document tree:

http://www.crummy.com/
software/
slides/
10.html
Site Search: