def content_type(content_type):
    """Attaches the supplied content_type to a Hug formatting function"""

    def decorator(method):
        method.content_type = content_type
        return method

    return decorator