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
MEB-50: Redirecting about/customers to /supporters page #245
Conversation
Can one of the admins verify this patch? |
@@ -49,3 +49,7 @@ def bad_customers(): | |||
@index_bp.route('/privacy') | |||
def privacy_policy(): | |||
return render_template('index/privacy.html') | |||
|
|||
@index_bp.route('/about/customers') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old URL was /about/customers.html
, so it seems you are missing the .html
here.
@@ -1,4 +1,4 @@ | |||
from flask import Blueprint, render_template | |||
from flask import Blueprint, render_template ,redirect , url_for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spaces are all over the place here. It should be foo, bar
– no space before the comma, one space after it, just as in English text.
|
||
@index_bp.route('/team') | ||
def team(): | ||
return render_template('index/team.html') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These spaces didn’t belong here so it was right to remove them, but that has nothing to do with the redirect issue. Therefore, these indentation fixes should be in a separate commit.
@uklauer I have made the changes |
I won’t judge whether it is better to remove the indented lines altogether or just the indentation, but in any case, my point about doing it in a separate commit still stands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having two empty lines between top level functions is actually intentional, so I'd keep them. But I agree with @uklauer, if you want to clean up unnecessary characters.
If you want, you could also add a test to make sure that redirect works correctly.
@brainzbot, add to whitelist. |
@uklauer I have fixed the indentation and implemented the redirect feature in two separate commits as you said and @gentlecat I am actually new to flask so I dont know how to write tests at present but I will learn it and will surely send a PR afterwards :) but I have tested the code on my local instance |
@gentlecat I have added the test in a new commit :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. Thanks!
/about/customers link is a dead link and it should be redirected to /supporters link
Issue Link : https://tickets.metabrainz.org/browse/MEB-50