I do something like this.

config.add_route("foos", "/foos/")
config.add_route("foo", "/foos/{id}/")
config.add_route("foo_", "/foos/{id}/{action}")

I use a trailing slash after conceptual objects so that I have the
option of switching to or from Traversal without changing the URLs.


On Thu, Mar 5, 2015 at 5:53 PM, Mário Idival <[email protected]> wrote:
> Yeah, It's sounds much better ! :)
> Thank You!
>
> Mário Idival
> Python Developer
>
> Twitter|Github|Skype : marioidival
> Facebook: mario.idival
> User Linux : #554446
>
> 2015-03-05 22:08 GMT-03:00 Blaise Laflamme <[email protected]>:
>
>> Sure... using two routes and discriminate on the view is also a good
>> choice:
>>
>> https://gist.github.com/marioidival/60a2a06730947cc32b00#comment-1406872
>>
>> On Thursday, March 5, 2015 at 3:53:34 PM UTC-5, Mário Idival wrote:
>>>
>>> Sounds good, It's good. But I try avoid many `add_route` in Configurator
>>> class, so I use only two routes.
>>>
>>> `_get_pet` and pet_id in __init__ it very nice, I'll use this snippet
>>> code :)
>>>
>>> Thank you
>>>
>>> Mário Idival
>>> Python Developer
>>>
>>> Twitter|Github|Skype : marioidival
>>> Facebook: mario.idival
>>> User Linux : #554446
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pylons-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/pylons-discuss.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pylons-discuss.
> For more options, visit https://groups.google.com/d/optout.



-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to