#1925: Create REST controller and add dispatch hooks for it.
------------------------+---------------------------------------------------
Reporter: mramm | Owner: percious
Type: defect | Status: new
Priority: normal | Milestone: 2.0
Component: TurboGears | Version: trunk
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Changes (by percious):
* owner: anonymous => percious
Comment:
This is probably pretty close to the solution I am after.
{{{
class Root(controllers.RootController):
def default(self, *args, **kw):
@expose('json')
def get(self, *args, **kw):
return dict(method='GET', args=kw)
@expose('json')
def post(self, *args, **kw):
return dict(method='POST', args=kw)
@expose('json')
def put(self, *args **kw):
return dict(method='PUT', args=kw)
# NOT exposed, for some reason
def delete(self, *args, **kw):
return dict(method='DELETE', args=kw)
}}}
also, see ticket #1883 for more information.
--
Ticket URL: <http://trac.turbogears.org/ticket/1925#comment:3>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---