POST-then-redirect and MethodViews POST-then-redirect and MethodViews flask flask

POST-then-redirect and MethodViews


It looks like a 302 redirect can be made with the same request method as the previous request. A 303 redirect, however, should always use GET (source).

The redirect function can take a status code. Try this:

            return redirect(url_for(                'provider',                provider_id=obj.id,                ),                code=303            )

Edit: Similar discussion: Redirecting to URL in Flask