Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #401 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

can't use expose(inputform=...) to handle both GET and POST

Reported by: ischenko@… Owned by: anonymous
Priority: normal Milestone: 1.0
Component: TurboGears Version:
Severity: minor Keywords:


When using @turbogears.expose() inputform parameter you can't use the same method to handle both displaying the form (via GET) and receiving data (via POST). The problem is that expose() decorator, if inputform arg is given assumes that the form data is always send and therefore fails if there is no data (e.g. plain GET with no parameters).

As a workaround, you have to use two methods which is awkward and doesn't play well with REST architecture. Alternatively, use can process form by hand without using inputform arg.

See also:  this discussion on Google Groups.

Change History

comment:1 Changed 13 years ago by jorge.vargas

  • Status changed from new to closed
  • Resolution set to fixed

in the thread they talk about


and that is closed on cherrypy, therefore I think this one should to.

Note: See TracTickets for help on using tickets.