text: Opened 11 years ago
  Closed 11 years ago
  #2931 closed defect (fixed)
  "if request.POST" should read "if request.method == 'POST'"
  Description
  From
  we have:).
  Then in
  we violate that advice with:
  def create_place(request): manipulator = Place.AddManipulator() if request.POST: ...
  Change History (6)
  comment:1 Changed 11 years ago by
  comment:2 Changed 11 years ago by
  request.POST is used once elsewhere in the docs and several places in trunk too that maybe should be changed.
  comment:3 Changed 11 years ago by
  comment:4 Changed 11 years ago by
  Hmm, should that be
  request.method.lower() == 'post' to be really sure? Just nitpicking, though.
  comment:5 Changed 11 years ago by
  .lower() shouldn't be necessary: according to documentation,
  request.method will always return an uppercase value.
  (In [3914]) Fixed #2931 -- Use request.method == 'POST' where appropriate in the examples.
  Thanks, David Schein.