Commit 60f806c8 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Added is_registered template filter for checking if the accessing user is registered.

parent 1dd6d26b
from django import template
from go.models import RegisteredUser
register = template.Library()
@register.filter
def is_registered( user ):
try:
registered = RegisteredUser.objects.get( user=user )
return True
except RegisteredUser.DoesNotExist:
return False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment