I'm experiencing unwanted route parts showing up in my generated urls.
They don't break the app, they just look ugly and possibly confusing.

Here's the relevent part of my routes:

    map.connect('story', ':story', controller="author",
action="showstory", conditions={'sub_domain':True,
'function':check_author})
    map.connect('login', 'login/:action', controller="login",
action="index")
    map.connect('front', '', controller="front", action="index")

And when I'm at this url:

http://jon.localhost.example:5000/fjrc (that fits the first, 'story',
route)

these urls are being generated:

                <a href="http://www.localhost.example:5000/";>Front
Page</a> |
                <a
href="http://www.localhost.example:5000/login/logout?story=fjrc";>Logout</a>

from these lines in the autohandler:
                <% h.link_to('Front Page', h.site_url('front')) %> |
                <% h.link_to("Login", h.site_url(controller="login",
action="index")) %>

using this helper: (I'm using subdomains, and I want all the main
account-management functionality to be at www)

def site_url(*args, **kargs):
    kargs['sub_domain'] = 'www'
    url = url_for(*args, **kargs)
    return url

When I change site_url to add 'story=None' to the kargs dict, I get
these urls generated instead:

                <a
href="http://www.localhost.example:5000/?story=None";>Front Page</a> |
                <a
href="http://www.localhost.example:5000/login/logout";>Logout</a>

How do I keep the ?story stuff from showing up in my generated urls?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to