src/flask/scaffold.py
def endpoint(self, endpoint: str) -> t.Callable:
        """Decorate a view function to register it for the given
        endpoint. Used if a rule is added without a ``view_func`` with
        :meth:`add_url_rule`.

        .. code-block:: python

            app.add_url_rule("/ex", endpoint="example")

            @app.endpoint("example")
            def example():
                ...

        :param endpoint: The endpoint name to associate with the view
            function.
        """

        def decorator(f):
            self.view_functions[endpoint] = f
            return f

        return decorator
Decorate a view function to register it for the given
        endpoint. Used if a rule is added without a ``view_func`` with
        :meth:`add_url_rule`.

        .. code-block:: python

            app.add_url_rule("/ex", endpoint="example")

            @app.endpoint("example")
            def example():
                ...

        :param endpoint: The endpoint name to associate with the view
            function.
        
Decorate a view function to register it for the given
endpoint. Used if a rule is added without a ``view_func`` with
Decorate a view function to register it for the given endpoint . Used if a rule is added without a ` ` view_func ` ` with
def endpoint(self, endpoint: str) -> t.Callable:
        def decorator(f):
            self.view_functions[endpoint] = f
            return f
        return decorator
def endpoint ( self , endpoint : str ) -> t . Callable : def decorator ( f ) : self . view_functions [ endpoint ] = f return f return decorator
Decorate a view function to register it for the given
endpoint.
Decorate a view function to register it for the given endpoint .
"""Decorate a view function to register it for the given
        endpoint. Used if a rule is added without a ``view_func`` with
        :meth:`add_url_rule`.

        .. code-block:: python

            app.add_url_rule("/ex", endpoint="example")

            @app.endpoint("example")
            def example():
                ...

        :param endpoint: The endpoint name to associate with the view
            function.
        """
self
endpoint
str
The endpoint name to associate with the view
function.
The endpoint name to associate with the view function .
meth


app.add_url_rule("/ex", endpoint="example")

@app.endpoint("example")
def example().
app . add_url_rule ( " / ex " endpoint = " example " ) @app . endpoint ( " example " ) def example () .