#1883: extend object dispatch to use HTTP verb info
------------------------+---------------------------------------------------
Reporter: mramm | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.0
Component: TurboGears | Version: trunk
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Comment (by jorge.vargas):
I like the idea, I just don't like the approach. How about this? I think I
got the inspiration from how appengine does it.
{{{
@expose('some/template/file')
def employee(self,...):
def get():
pass
def post():
pass
}}}
And you could also do
{{{
def POST_employee(self,...)
pass
def GET_employee(self,....)
pass
@expose('some/template/file')
def employee(self,...):
get = GET_employee
post = POST_employee
}}}
last but not least we could just provide a check so you can do
{{{
@expose()
def employee(self):
if tg.is_get():
pass
}}}
--
Ticket URL: <http://trac.turbogears.org/ticket/1883#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
-~----------~----~----~----~------~----~------~--~---