Hi all,

I am new to Pylons (from Django), and am porting my personal blog site
to Pylons. I had some problems on url_for() funcions,tried searching
this group but no luck,so post my questions here to look for help.

In my Pylons application there is a blog controller to handle all
requests to the blog.I have the following routes configuration:

map.connect('', controller='blog', action='page')
map.connect('blog', controller='blog', action='page')
map.connect(':controller/:action/:id')

and I have two actions in controller blog : page and detail , to
generate list of posts and detail of a post,respectively.

So I can use h.url_for(controller='bog',action='detail',id=1) to
generate a link to post 1,which is "/blog/detail/1". but in order to
be consistent with my original site, I want it be like "/blog/1". I
noticed if I omit the action argument,a default one 'index' would be
used,thus instead of "/blog/1" I got "/blog/index/1" ... how can I get
what I want?or I have to hand write the <a/> HTML tag?

Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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