from django import template
from django.template.defaultfilters import stringfilter

register = template.Library()

@register.filter
def access(obj, f):
    return getattr(obj, f, None)

@register.filter
def className(obj):
    return obj.__class__.__name__
