Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Return a 30x (Redirect) response

Redirect to another location specified by urls with an optional
custom response code.

:param urls: A single URL or list of URLs
:type urls: str or list

:param code: HTTP Redirect code
:type code: int

src/c/i/circuits-3.0.0.dev/examples/web/wiki/wiki.py   circuits(Download)
    def POST(self, name="FrontPage", **form):
        self.db.save(name, form.get("text", ""))
        return self.redirect(name)
 
app = Server(("0.0.0.0", 9000))

src/c/i/circuits-3.0.0.dev/tests/web/test_wsgi_application.py   circuits(Download)
    def test_redirect(self):
        return self.redirect("/")
 
    def test_forbidden(self):
        return self.forbidden()

src/c/i/circuits-3.0.0.dev/tests/web/test_core.py   circuits(Download)
    def test_redirect(self):
        return self.redirect("/")
 
    def test_forbidden(self):
        return self.forbidden()