With TurboGears 2 final, I'm experiencing strange behavior with the
redirect function. Redirecting by itself works alright for internal
application urls, but doesn't work correctly if you want to redirect
to an unrelated path on the same domain.

To clarify what I mean, here's an example:

    https://example.com/reports <--- this is where my application
lives
    https://example.com/ <--- root of the site

To redirect to the root of the site, I previously used redirect('/'),
and to redirect to the root of the application, I used redirect(url
('/')). Upon inspection of the redirect function, I've found that url
is automatically applied to any url passed into the redirect function.
This makes redirects to same-domain-non-TurboGears paths painful. This
is what happens, just to be completely clear:

    Under the alpha: redirect('/odbc_test') redirects to /odbc_test
    Under the alpha: redirect(url('/odbc_test')) redirects to /reports/
odbc_test
    Under the final: redirect('/odbc_test') redirects to /reports/
odbc_test

The final release's behavior seems very strange to me, and I'm not
sure if this is how you guys intended this function to work. Thanks
for your time :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to