Changes between Version 2 and Version 3 of CookBookManipulatorCustomManipulator
- Timestamp:
- Jan 27, 2006, 9:33:23 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookManipulatorCustomManipulator
v2 v3 2 2 3 3 {{{ 4 #!python 4 5 from django.core import formfields, validators 5 6 … … 34 35 }}} 35 36 36 Now to use, subclass it, and fill in the necessary methods (" __init__" and "complete"), also give it the fields:37 Now to use, subclass it, and fill in the necessary methods ("{{{__init__}}}" and "{{{complete}}}"), also give it the fields: 37 38 38 39 {{{ 40 #!python 39 41 class PollEdit(Manipulator): 40 42 fields = ( … … 57 59 58 60 {{{ 61 #!python 59 62 def edit_poll(request, id): 60 63 poll = polls.get_object(pk=id) #Assume it works … … 70 73 71 74 {{{ 75 #!python 72 76 class PollAdd(PollEdit): 73 77 def __init__(self): … … 85 89 86 90 {{{ 91 #!python 87 92 def add_poll(request): 88 93 manipulator = PollAdd()