The pyramid form of url dispatch is very explicit - you make a specific
route and assign a view to handle that based on properties of the request.
In order to make the "magic" routing based on ``action``, the simple way is
to just use the pyramid_handlers package which provides a very similar
behavior to the original pylons controllers.

http://docs.pylonsproject.org/projects/pyramid_handlers/dev/

Michael


On Wed, Mar 16, 2011 at 5:03 AM, brutka <[email protected]> wrote:

> Hello!
> I am learning Pyramid after a few project on Pylons.
> Cannot get the Pyramid routing (I am not using traversing).
>
> Questions.
>
> 1. In Pylons it was usefull to set controller explicit, and have the
> action dynamic (as part of Url matching).
> Can I do somehting like that in Pyramid? Or I have to specify routes
> for ALL Views? (for all actions in Pylons terms)
>
> 2. I am using language code as part of URL.
> ex, /pagename - for default language
> /en/pagename - for english
> /fr/pagename - for french, etc...
>
> I order to use same routes for all languages I inherited from Mapper,
> overloaded match and routematch methods (I detect if language is
> present in URL, save it, then remove it from URL, and then run
> original match and routmatch code).
> How can I do something like that in Pyramid?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" 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/pylons-discuss?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to