def JinjaEnum(cls):
    """
    This is a decorator used to inject the decorated Enum into Jinja globals
    which allows you to access it from the front end. If you need to access
    an Enum from JS, a better tool to use is the JSEnum decorator.
    """
    if cls.__name__ not in current_app.jinja_env.globals:
        current_app.jinja_env.globals[cls.__name__] = cls
        JINJA_ENUMS[cls.__name__] = cls
    else:
        raise KeyError("{} was already defined as a JinjaEnum".format(cls.__name__))
    return cls

    This is a decorator used to inject the decorated Enum into Jinja globals
    which allows you to access it from the front end. If you need to access
    an Enum from JS, a better tool to use is the JSEnum decorator.
    
CTFd/constants/__init__.py