Code

Changes between Version 1 and Version 2 of CookBookManipulatorCustomManipulator


Ignore:
Timestamp:
01/18/06 17:13:26 (8 years ago)
Author:
brantley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CookBookManipulatorCustomManipulator

    v1 v2  
    6767}}} 
    6868 
    69 Here's a custom Add Manipulator: 
     69Here's a custom Add Manipulator, I like to build off of the first, so that the fields are the same: 
    7070 
    7171{{{ 
    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          
     72class PollAdd(PollEdit):         
    7873    def __init__(self): 
    7974        self.default = {'title': "Unnamed", 'question': 'Insert your question here.'}