def JSEnum(cls):
    """
    This is a decorator used to gather all Enums which should be shared with
    the CTFd front end. The JS_Enums dictionary can be taken be a script and
    compiled into a JavaScript file for use by frontend assets. JS_Enums
    should not be passed directly into Jinja. A JinjaEnum is better for that.
    """
    if cls.__name__ not in JS_ENUMS:
        JS_ENUMS[cls.__name__] = dict(cls.__members__)
    else:
        raise KeyError("{} was already defined as a JSEnum".format(cls.__name__))
    return cls

    This is a decorator used to gather all Enums which should be shared with
    the CTFd front end. The JS_Enums dictionary can be taken be a script and
    compiled into a JavaScript file for use by frontend assets. JS_Enums
    should not be passed directly into Jinja. A JinjaEnum is better for that.
    
CTFd/constants/__init__.py