def basic_route(self, rule, name=None, methods=('GET', 'HEAD'),
                    headers=None, content_type=None, func=None):
        """
        The basic_route decorator registers a route with the Module without
        holding your hand about it.

        It functions similarly to the :func:`Module.route` decorator, but it
        doesn't wrap the function with any argument processing code. Instead,
        the function is given only the request object, and through it access to
        the regular expression match.

        Example Usage::

            @app.basic_route("/char/<char>")
            def my_route(request):
                char, = request.match.groups()
                return "The character is %s!" % char

        That is essentially equivalent to::

            @app.route("/char/<char>")
            def my_route(request, char):
                return "The character is %s!" % char

        .. note::

            Output is still handled the way it is with a normal route, so you
            can return strings and dictionaries as usual.

        =============  ============
        Argument       Description
        =============  ============
        rule           The route rule to match for a request to go to the decorated function. See :func:`Module.route` for more information.
        name           *Optional.* The name of the decorated function, for use with the :func:`url_for` helper function.
        methods        *Optional.* A list of HTTP methods to allow for this request handler. By default, only ``GET`` and ``HEAD`` requests are allowed, and all others will result in a ``405 Method Not Allowed`` error.
        headers        *Optional.* A dictionary of HTTP headers to always send with the response from this request handler. Any headers set within the request handler will override these headers.
        content_type   *Optional.* The HTTP Content-Type header to send with the response from this request handler. A Content-Type header set within the request handler will override this.
        func           *Optional.* The function for this view. Specifying the function bypasses the usual decorator-like behavior of this function.
        =============  ============
        """
        if not '/' in rule:
            rule = '/' + rule

        def decorator(func):
            if not callable(func):
                raise ValueError("Request handler must be callable.")

            if name is None:
                if hasattr(func, "__name__"):
                    _name = func.__name__
                elif hasattr(func, "__class__"):
                    _name = func.__class__.__name__
                else:
                    raise ValueError("Cannot find name for rule. Please "
                                     "specify name manually.")
            else:
                _name = name

            # Get the rule table for this rule.
            rule_table = self._routes.setdefault(rule, {})
            if isinstance(rule_table, Module):
                raise ValueError("The rule %r is claimed by a Module." % rule)

            # Now, for each method, store the data.
            for method in methods:
                rule_table[method] = (func, _name, False, False, headers,
                                      content_type)

            # Recalculate routes and return.
            self._recalculate_routes()
            return func

        if func:
            return decorator(func)
        return decorator
dataset/ETHPy150Open ecdavis/pants/pants/web/application.py/Module.basic_route/original