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 #1996 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 years ago

[PATCH] Support for dispatching based on HTTP method for REST APIs

Reported by: PeterRussell Owned by: faide
Priority: normal Milestone: 1.1b2
Component: TurboGears Version: 1.0.7
Severity: normal Keywords: needs review
Cc:

Description

As requested in the comments to the post here:  http://blog.pythonisito.com/2008/07/restfulness-in-turbogears.html I've attached a patch with containing support for dispatching on HTTP method, and tests for it.

Attachments

rest_method.patch Download (6.7 KB) - added by PeterRussell 6 years ago.
rest_method2.patch Download (6.0 KB) - added by PeterRussell 6 years ago.
Updated patch that uses webtest

Change History

Changed 6 years ago by PeterRussell

comment:1 Changed 6 years ago by Chris Arndt

  • Keywords needs review added

comment:2 Changed 6 years ago by faide

  • Summary changed from Support for dispatching based on HTTP method for REST APIs to [PATCH] Support for dispatching based on HTTP method for REST APIs

comment:3 Changed 6 years ago by PeterRussell

Would it be helpful if I refactored the tests to use webtest ala TG 1.1?

comment:4 Changed 6 years ago by faide

Since the milestone _is_ 1.1 this patch would be applied to 1.1, so the tests should use our new 1.1 (webtest) system.

Thanks for the effort!

Changed 6 years ago by PeterRussell

Updated patch that uses webtest

comment:5 Changed 6 years ago by PeterRussell

Attached is an updated patch that implements REST methods. However it requires the patch attached to #2005 in order to work, and also requires that paste issue  298 is fixed as well.

I've got to say the new testing framework is far far better than the old one!

comment:6 Changed 6 years ago by faide

Your paste patch seems flawed as the first line you change adds a digit in front of the comment line...

and as for the testing framework: you're right :) I love this evolution! It brings TG to a new level.

comment:7 Changed 6 years ago by PeterRussell

OK, That's fixed

comment:8 Changed 6 years ago by faide

  • Status changed from new to assigned
  • Milestone changed from 1.1 to 1.1 beta 2

comment:9 Changed 6 years ago by faide

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

applied to r5727 thanks a lot to Peter Russel and Rick Copeland!

Note: See TracTickets for help on using tickets.