Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-30 Thread Iain Duncan
On Tue, 2009-06-30 at 15:59 -0400, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Iain Duncan wrote: > > On Tue, 2009-06-30 at 15:30 -0400, Tres Seaver wrote: > >> -BEGIN PGP SIGNED MESSAGE- > >> Hash: SHA1 > >> > >> Iain Duncan wrote: > >> > >>> Thanks for the cl

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Iain Duncan wrote: > On Tue, 2009-06-30 at 15:30 -0400, Tres Seaver wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Iain Duncan wrote: >> >>> Thanks for the clarification, that's what I tried last night, ( called >>> the top one PetCon

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-30 Thread Iain Duncan
On Tue, 2009-06-30 at 15:30 -0400, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Iain Duncan wrote: > > > Thanks for the clarification, that's what I tried last night, ( called > > the top one PetContextFactory ). The problem I hit was that if the PCF > > is the end of

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Iain Duncan wrote: > Thanks for the clarification, that's what I tried last night, ( called > the top one PetContextFactory ). The problem I hit was that if the PCF > is the end of the traversal, then the context should be a list of pets, > but if it

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-30 Thread Iain Duncan
On Tue, 2009-06-30 at 06:19 -0400, Chris McDonough wrote: > On 6/30/09 1:39 AM, Iain Duncan wrote: > >> Let's imagine a view "pets": > >> > >> from webob import Response > >> > >> def pets(context, request): > >> return Response ('OK') > >> > >> when a URL comes in that is for a paricular pet

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-30 Thread Chris McDonough
On 6/30/09 1:39 AM, Iain Duncan wrote: >> Let's imagine a view "pets": >> >> from webob import Response >> >> def pets(context, request): >> return Response ('OK') >> >> when a URL comes in that is for a paricular pet: >> >> from webob import Response >> >> >> def pets(context, request): >>

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-29 Thread Iain Duncan
> Let's imagine a view "pets": > > from webob import Response > > def pets(context, request): > return Response ('OK') > > when a URL comes in that is for a paricular pet: > > from webob import Response > > > def pets(context, request): > if request.subpath: > petnum = requ

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-29 Thread Chris McDonough
On 6/29/09 8:26 PM, Iain Duncan wrote: > I'm wondering what the conventional wisdom is for doing bfg apps to > handle crud operations with urls like > > /pet -> list pets > > /pet/1 -> view pet model, id 1 > /pet/1/view > > /pet/1/edit -> edit pet model, id 1 > > Is this something that can be ha