Hi iain,

The second one is definitely easier to do in CherryPy, but the second one is 
possible.  The way I did it was to create a custom default method that calls 
the real methods with the parameters sorted out.

I also used the default method as a opportunity to convert the number 7 into 
the real database object and feed that, instead, to the real method (edit).  
That way there is less boilerplate code in each method.

By crafting a common, generic default method, you can just subclass your own 
custom controller, rather than Controller, itself, and get the functionality 
for free.

It's definitely more work, though, just for a bit of cosmetics.

Hope this helps,
Krys

On Friday 1 June 2007 23:28, iain duncan wrote
> I've been refactoring my admin interface and trying to get it nice and
> RESTful ( oh the buzzwords! ). As I am new to this resting business, I'm
> wondering, is there a compelling reason to need to do:
>
> page/7/edit
> vs
> page/edit/7
>
> The example in the book uses the first, but I'm finding the second would
> be much easier to do with CherryPy.
>
> Thanks helpful gurus!
> Iain
>
>
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to