Changes between Version 9 and Version 10 of CookBookManipulatorCustomManipulator


Ignore:
Timestamp:
Jul 20, 2006, 9:21:17 AM (18 years ago)
Author:
Jorge Gajon <gajon@…>
Comment:

The comments at if(manipulator.form) were confusing.

Legend:

Unmodified
Added
Removed
Modified
  • CookBookManipulatorCustomManipulator

    v9 v10  
    8383    manipulator = PollEdit(poll)    # Create the manipulator.
    8484    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?
    8686         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.
    8888         return HttpResponseRedirect("/polls/%d" % poll.id)
    8989
     
    115115    manipulator = PollAdd()             # Create the manipulator
    116116    poll = manipulator.process(request) # Process the request
    117     if (manipulator.form):              # Are we done processing?
     117    if (manipulator.form):              # Should we render the form?
    118118         return render_to_response('polls/new_form', {'form': manipulator.form})
    119     else:                               # Otherwise, respond with the form.
     119    else:                               # Otherwise, redirect to the poll view page.
    120120         return HttpResponseRedirect("/polls/%d" % poll.id)
    121121}}}
Back to Top