Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1262. Display new bug report URI, rather than /issues/new. #1272

Closed
wants to merge 1 commit into from

Conversation

miketaylr
Copy link
Member

Originally I wanted to solve this on the Python side... but there's an issue:

Flask's url_for can only pass in variables if they're defined in the route as "variables". So for the following route we have the variable <int:number>

@app.route('/issues/<int:number>')
def show_issue(number, show_thanks_flash=False):

if we do return redirect(url_for('show_issue', number=123, show_thanks_flash=False),

we get redirected to /issues/123?show_thanks_flash=False (because stuff it doesn't recognize is treated as GET args).

We could work around this by defining a route like so:

@app.route('/issues/<int:number>/<thanks>'), but people might bookmark that.

I wonder if we could work around this with the session cookie, rather than doing it in JS? Or some other idea?

Not ready for review. Let me try the session thingy.

@miketaylr
Copy link
Member Author

Yeah, I don't like this. Closing in favor of #1273.

@miketaylr miketaylr closed this Jan 6, 2017
@miketaylr miketaylr deleted the issues/1262/1 branch January 6, 2017 20:26
@karlcow
Copy link
Member

karlcow commented Jan 8, 2017

Just a note. I wonder if you could have done it with using the Referer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants