Without really extending identity, I don't know that you can fully get
rid of the login page.  One of the underlying assuptions in the forms
based identity is that if you don't have rights to a given controller,
you are redirected to the login form (the url looks like the restricted
page, but what is displayed is the login form).

However, it is pretty easy just embed a div in any given page with a
little login form.  Something like:

<div py:if="tg.identity.anonymous">
 <form action="/"method="POST"> <!-- --action should be wherever you
want the user to end up-->
            <table>
                <tr>
                    <td class="label">
                        <label for="user_name">User Name:</label>
                    </td>
                    <td class="field">
                        <input type="text" id="user_name"
name="user_name"/>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        <label for="password">Password:</label>
                    </td>
                    <td class="field">
                        <input type="password" id="password"
name="password"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="buttons">
                        <input type="submit" name="login"
value="Login"/>
                    </td>
                </tr>
            </table>
        </form>
</div>

You should be able to throw that wherever you want and have it work.
Untested, of course. :-)

Floating windows and other magic stuff could be implemented in similar
ways. Just keep the three form names the same (user_name, password,
login), and you should be good to go.


--~--~---------~--~----~------------~-------~--~----~
 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to