{"action":"created","issue":{"url":"https://api.github.com/repos/pallets/flask/issues/1168","repository_url":"https://api.github.com/repos/pallets/flask","labels_url":"https://api.github.com/repos/pallets/flask/issues/1168/labels{/name}","comments_url":"https://api.github.com/repos/pallets/flask/issues/1168/comments","events_url":"https://api.github.com/repos/pallets/flask/issues/1168/events","html_url":"https://github.com/pallets/flask/issues/1168","id":41899563,"number":1168,"title":"function flash() not working with redirect()","user":{"login":"robin92","id":1593736,"avatar_url":"https://avatars.githubusercontent.com/u/1593736?v=3","gravatar_id":"","url":"https://api.github.com/users/robin92","html_url":"https://github.com/robin92","followers_url":"https://api.github.com/users/robin92/followers","following_url":"https://api.github.com/users/robin92/following{/other_user}","gists_url":"https://api.github.com/users/robin92/gists{/gist_id}","starred_url":"https://api.github.com/users/robin92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robin92/subscriptions","organizations_url":"https://api.github.com/users/robin92/orgs","repos_url":"https://api.github.com/users/robin92/repos","events_url":"https://api.github.com/users/robin92/events{/privacy}","received_events_url":"https://api.github.com/users/robin92/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2014-09-04T06:29:38Z","updated_at":"2016-10-17T16:25:11Z","closed_at":"2014-09-04T09:13:45Z","body":"Here's the example:\r\n```python\r\nfrom flask import Flask, flash, get_flashed_messages, redirect, url_for\r\n\r\napp = Flask(__name__)\r\napp.secret_key = 'some_secret'\r\n\r\n@app.route('/')\r\ndef index():\r\n    app.logger.debug(get_flashed_messages())\r\n    return 'Hello world'\r\n\r\n@app.route('/generate/success')\r\ndef page_success():\r\n    flash('This message will be visible!')\r\n    return str(get_flashed_messages())\r\n\r\n@app.route('/generate/fail',)\r\ndef page_fail():\r\n    flash('This message will be lost!')\r\n    return redirect(url_for('index'))\r\n\r\nif __name__ == \"__main__\":\r\n    app.run()\r\n```\r\n\r\nAs you can see flash() fails when using redirect. Tried with ``SERVER_NAME`` both set and unset. Using ``Flask==0.10.1``.\r\n\r\nPlease resolve the issue ASAP since it's a top blocker in my project."},"comment":{"url":"https://api.github.com/repos/pallets/flask/issues/comments/254257892","html_url":"https://github.com/pallets/flask/issues/1168#issuecomment-254257892","issue_url":"https://api.github.com/repos/pallets/flask/issues/1168","id":254257892,"user":{"login":"ghukill","id":1753087,"avatar_url":"https://avatars.githubusercontent.com/u/1753087?v=3","gravatar_id":"","url":"https://api.github.com/users/ghukill","html_url":"https://github.com/ghukill","followers_url":"https://api.github.com/users/ghukill/followers","following_url":"https://api.github.com/users/ghukill/following{/other_user}","gists_url":"https://api.github.com/users/ghukill/gists{/gist_id}","starred_url":"https://api.github.com/users/ghukill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghukill/subscriptions","organizations_url":"https://api.github.com/users/ghukill/orgs","repos_url":"https://api.github.com/users/ghukill/repos","events_url":"https://api.github.com/users/ghukill/events{/privacy}","received_events_url":"https://api.github.com/users/ghukill/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T16:25:10Z","updated_at":"2016-10-17T16:25:10Z","body":"Encountered this today, removed `APPLICATION_ROOT`, and problem fixed.  Thanks for the update after your fix @robin92, much appreciated."}}
{"actor":{"display_login":"ghukill"}}