

def __init__(self, template, handler=None, name=None, defaults=None, build_only=False, handler_method=None, methods=None, schemes=None, redirect_to=None, redirect_to_name=None, strict_slash=False):
    "Initializes a URL route. Extra arguments compared to\n        :meth:`webapp2.Route.__init__`:\n\n        :param redirect_to:\n            A URL string or a callable that returns a URL. If set, this route\n            is used to redirect to it. The callable is called passing\n            ``(handler, *args, **kwargs)`` as arguments. This is a\n            convenience to use :class:`RedirectHandler`. These two are\n            equivalent::\n\n                route = Route('/foo', handler=webapp2.RedirectHandler,\n                              defaults={'_uri': '/bar'})\n                route = Route('/foo', redirect_to='/bar')\n\n        :param redirect_to_name:\n            Same as `redirect_to`, but the value is the name of a route to\n            redirect to. In the example below, accessing '/hello-again' will\n            redirect to the route named 'hello'::\n\n                route = Route('/hello', handler=HelloHandler, name='hello')\n                route = Route('/hello-again', redirect_to_name='hello')\n\n        :param strict_slash:\n            If True, redirects access to the same URL with different trailing\n            slash to the strict path defined in the route. For example, take\n            these routes::\n\n                route = Route('/foo', FooHandler, strict_slash=True)\n                route = Route('/bar/', BarHandler, strict_slash=True)\n\n            Because **strict_slash** is True, this is what will happen:\n\n            - Access to ``/foo`` will execute ``FooHandler`` normally.\n            - Access to ``/bar/`` will execute ``BarHandler`` normally.\n            - Access to ``/foo/`` will redirect to ``/foo``.\n            - Access to ``/bar`` will redirect to ``/bar/``.\n        "
    super(RedirectRoute, self).__init__(template, handler=handler, name=name, defaults=defaults, build_only=build_only, handler_method=handler_method, methods=methods, schemes=schemes)
    if (strict_slash and (not name)):
        raise ValueError('Routes with strict_slash must have a name.')
    self.strict_slash = strict_slash
    self.redirect_to_name = redirect_to_name
    if (redirect_to is not None):
        assert (redirect_to_name is None)
        self.handler = webapp2.RedirectHandler
        self.defaults['_uri'] = redirect_to

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/webapp2-2.3/webapp2_extras/routes.py RedirectRoute.__init__/original