Skip to content

Instantly share code, notes, and snippets.

@statico
Created May 14, 2010 05:58
Show Gist options
  • Save statico/400858 to your computer and use it in GitHub Desktop.
Save statico/400858 to your computer and use it in GitHub Desktop.
{% if request.facebook.uid or user.is_authenticated %}
<div id="nav">
<ul>
(nav links go here)
{# User is logged in via Facebook (or hybrid account) #}
{% if request.facebook.uid %}
<li><a href="#" onclick="FB.Connect.logoutAndRedirect('{% url socialregistration.views.logout %}'); return false"
>Log Out</a></li>
{# User is logged in via Django account #}
{% else %}{% if user.is_authenticated %}
<li><a href="{% url django.contrib.auth.views.logout_then_login %}
">Log Out</a></li>
{% endif %}{% endif %}
</ul>
</div>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment