I've always done it as rebus_ explained. Put the login options in the
base template wrapping it in {% if user.is_authenticated %} to display
a different mechanism for users that are already logged-in. That form
action is set to the login URL and and the login view handles the
login processing, error handling, and redirects.
On Feb 21, 11:44 am, Patrick <[email protected]> wrote:
> I thought that if I put the login forms on the base template and then
> extend all others from that base template, the login forms would be
> available all the way through. But there is a problem: the login forms
> are only displayed if the url is processed by the 'login' view. That
> login view provides the forms needed for authentication, among other
> things.
>
> The thing is, what I want is to allow user to authenticate no matter
> what page from the site he is visitting. How can that be done?
>
> Many thanks in advance,
>
> Patrick Steiger
--
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en.