Hello,

I am hoping this will be a very simple question for many of you.

I have built simple Django login function. When I log in, my log in
page will say "Welcome, username" etc. It works beautifully.

However, on subsequent pages, eg /nextpage/ even though I have the
same code in the page, the username doesn't display:

{% if request.user.is_authenticated %}
    <p>{{ user.username }} is logged in.</p>
{% else %}
    <p>You are not logged in.</p>
{% endif %}

I don't understand why it works on the login page only.

It may be worth mentioning that I have a login_required decorator on
the page so I don't really need the if/else above, I am aware of that
but I am being desperate!

Any thoughts?

Thanks,

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

Reply via email to