Changes between Version 8 and Version 9 of CookBookManipulatorCustomManipulator
- Timestamp:
- Jul 15, 2006, 2:54:09 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookManipulatorCustomManipulator
v8 v9 83 83 manipulator = PollEdit(poll) # Create the manipulator. 84 84 manipulator.process(request) # Process the request. 85 if (manipulator.done): # If we are done, redirect to the poll view page. 85 if (manipulator.form): # If we are done, redirect to the poll view page. 86 return render_to_response('polls/edit_form', {'form': manipulator.form}) 87 else: # Otherwise, we render the form. 86 88 return HttpResponseRedirect("/polls/%d" % poll.id) 87 else: # Otherwise, we render the form. 88 return render_to_response('polls/edit_form', {'form': manipulator.form}) 89 89 90 }}} 90 91 … … 114 115 manipulator = PollAdd() # Create the manipulator 115 116 poll = manipulator.process(request) # Process the request 116 if (manipulator.done): # Are we done processing? 117 if (manipulator.form): # Are we done processing? 118 return render_to_response('polls/new_form', {'form': manipulator.form}) 119 else: # Otherwise, respond with the form. 117 120 return HttpResponseRedirect("/polls/%d" % poll.id) 118 else: # Otherwise, respond with the form.119 return render_to_response('polls/new_form', {'form': manipulator.form})120 121 }}}