I might open a ticket, but in the meantime I've found an acceptable
workaround. I created a kid template called redirect_home that looks
like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
xmlns:py="http://purl.org/kid/ns#";>
<head>
    <title>Welcome to TurboGears</title>
</head>
<body>
    <?python
    import turbogears
    raise turbogears.redirect(turbogears.url('/'))
    ?>
</body>
</html>

(I'm not sure how much of that template is absolutely necessary to
satisfy Kid's lust for valid XML)

Previously the redirecting functions did not have a template assigned.
I simply assigned this template and took out my redirect statement in
the function. Now my function does not need to know if it should return
json or not, which on the whole is a better way to write the function.
A kid template that only redirects is not extremely elegant, but at
least it keeps my controller looking friendly.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to