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 is part of Crummy, the webspace of Leonard Richardson (contact information). It was last modified on Tuesday, April 13 2004, 04:17:26 Nowhere Standard Time and last built on Wednesday, September 10 2025, 22:00:01 Nowhere Standard Time.

Crummy is © 1996-2025 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: