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