Changes between Version 1 and Version 2 of CookBookManipulatorCustomManipulator
- Timestamp:
- Jan 18, 2006, 7:13:26 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookManipulatorCustomManipulator
v1 v2 67 67 }}} 68 68 69 Here's a custom Add Manipulator :69 Here's a custom Add Manipulator, I like to build off of the first, so that the fields are the same: 70 70 71 71 {{{ 72 class PollAdd(Manipulator): 73 fields = ( 74 formfields.TextField("title", maxlength=32, is_required=True), 75 formfields.TextField("question", maxlength=128, is_required=True), 76 ) 77 72 class PollAdd(PollEdit): 78 73 def __init__(self): 79 74 self.default = {'title': "Unnamed", 'question': 'Insert your question here.'}