Ticket #1625 (closed defect: wontfix)

Opened 2 years ago

Last modified 2 years ago

mods.pylonshf.valid validates a get request

Reported by: kwilliams Assigned to: alberto
Priority: normal Milestone: 2.0
Component: ToscaWidgets Version:
Severity: normal Keywords:
Cc:

Description

The toscawidgets.mods.pylonshf.valid is being called for both GET and POST requests. According to the toscawidgets.mods.pylonshf.valid doc string:

Given a TW form or dict of validators, valid() will attempt to validate the form or validator dict as long as a POST request is made. No validation is performed on GET requests unless post_only is False.

toscawidgets.mods.pylonshf.validate could be altered such that it only calls toscawidgets.mods.pylonshf.valid on a POST request. This will allow a pylons controller action to be decorated with validate and still be able to display a form as well as handle its data posted from that form.

Attachments

validate_post_only.diff (1.2 kB) - added by kwilliams on 01/03/08 15:19:31.

Change History

01/03/08 15:19:31 changed by kwilliams

  • attachment validate_post_only.diff added.

06/05/08 09:32:48 changed by alberto

  • status changed from new to closed.
  • resolution set to wontfix.

This is by design, the docstring is wrong and has been updated.

Alberto