|
Jeff Hinrichs - DM&T
jeffh at dundeemt.com
Thu May 3 20:58:59 EDT 2007
with mod_python + vampire what is the proper way to dispatch something like:
/jobs/view/7
I'm thinking of this idiom since it is common in some other frameworks,
def _jobs_view(req,path):
return 'using _jobs_view'
def _jobs(req, path):
d = path.split('/')
if d[1] = 'view':
return _jobs_view(req, path)
else:
return 'unknown action'
job = vampire.PathInfo(_jobs)
I'm trying to make a RESTful api, i.e. /jobs/view/N, /jobs/edit/N, etc
/Thanking/you/jeff
--
Jeff Hinrichs
|