# Path: account/utils.py
# def user_display(user):
#     return settings.ACCOUNT_USER_DISPLAY(user)


from django import template
from django.template.base import kwarg_re
from django.template.defaulttags import URLNode
from django.utils.html import conditional_escape
from django.utils.http import urlencode
from account.utils import user_display


register = template.Library()


class UserDisplayNode(template.Node):

    def __init__(self, user, as_var=None):
        self.user_var = template.Variable(user)
        self.as_var = as_var

    def render(self, context):
        user = self.user_var.resolve(context)
        display = user_display(user)

# Path: account/utils.py
# def user_display(user):
#     return settings.ACCOUNT_USER_DISPLAY(user)


# Path: account/templatetags/account_tags.py
from django import template
from django.template.base import kwarg_re
from django.template.defaulttags import URLNode
from django.utils.html import conditional_escape
from django.utils.http import urlencode
from account.utils import user_display



register = template.Library()


class UserDisplayNode(template.Node):

    def __init__(self, user, as_var=None):
        self.user_var = template.Variable(user)
        self.as_var = as_var

    def render(self, context):
        user = self.user_var.resolve(context)
        display = user_display(user)

        if self.as_var: