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, 00:17:26 Nowhere Daylight Time and last built on Thursday, November 12 2026, 04:00:06 Nowhere Standard Time.

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

Document tree:

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