how to redirect to home page in flask after clicking submit code example Example: how to redirect in flask to the same page return redirect(request.referrer)