@classmethod
def template_for(cls, attr_code):
    """
        Returns an attribute template for attribute with a given code.
        """
    try:
        return cls.objects.get(code=attr_code).template
    except cls.DoesNotExist:
        return None
