Andre Lopes wrote:

> Hi,
> 
> I am new to Django... I have made a logout link, but now I am in doubt
> on which the best way to show/hide this template tag:
> 
> [code]
> <a href="{% url auth_logout_next 'directorio' %}">Logout</a>
> [/code]
> 
> Which is the best way of show/hide this link?
> 
> Sorry if it is a basic question.
> 
> 
> Best Regards,
> 

I use

{% if user.is_authenticated %}

to condition my logout link's appearance.

See https://docs.djangoproject.com/en/1.3/topics/auth/#authentication-data-
in-templates

Cheers,

Kev

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to