Flask Redirect

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


  • redirect(location, code, Response)


locationThe location the response should redirect to.
code(Optional) The redirect status code, 302 by default. Supported codes are 301, 302, 303, 305, and 307.
Response(Optional) A Response class to use when instantiating a response. The default is werkzeug.wrappers.Response if unspecified.


The location parameter must be a URL. It can be input raw, such as 'http://www.webpage.com' or it can be built with the url_for() function.

Got any Flask Question?