Skip to content

Instantly share code, notes, and snippets.

@EdwardIII
Created April 2, 2013 16:13
Show Gist options
  • Save EdwardIII/5293499 to your computer and use it in GitHub Desktop.
Save EdwardIII/5293499 to your computer and use it in GitHub Desktop.
from django import template
register = template.Library()
@register.simple_tag
def is_logged_in(request):
print "are we in the tag?"
return request.user.is_authenticated()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment