openslides_backend/presenter/presenter.py
def register_presenter(
    name: str,
    csrf_exempt: bool = False,
) -> Callable[[Type[BasePresenter]], Type[BasePresenter]]:
    """
    Decorator to be used for presenter classes. Registers the class so that it
    can be found by the handler.
    """

    def wrapper(clazz: Type[BasePresenter]) -> Type[BasePresenter]:
        clazz.csrf_exempt = csrf_exempt
        presenters_map[name] = clazz
        return clazz

    return wrapper

    Decorator to be used for presenter classes. Registers the class so that it
    can be found by the handler.
    
Decorator to be used for presenter classes. Registers the class so that it
can be found by the handler.
Decorator to be used for presenter classes . Registers the class so that it can be found by the handler .
def register_presenter(
    name: str,
    csrf_exempt: bool = False,
) -> Callable[[Type[BasePresenter]], Type[BasePresenter]]:
    def wrapper(clazz: Type[BasePresenter]) -> Type[BasePresenter]:
        clazz.csrf_exempt = csrf_exempt
        presenters_map[name] = clazz
        return clazz
    return wrapper
def register_presenter ( name : str , csrf_exempt : bool = False , ) -> Callable [ [ Type [ BasePresenter ] ] , Type [ BasePresenter ] ] : def wrapper ( clazz : Type [ BasePresenter ] ) -> Type [ BasePresenter ] : clazz . csrf_exempt = csrf_exempt presenters_map [ name ] = clazz return clazz return wrapper
Decorator to be used for presenter classes.
Decorator to be used for presenter classes .
"""
    Decorator to be used for presenter classes. Registers the class so that it
    can be found by the handler.
    """
name
str
csrf_exempt
bool