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

MEB-50: Redirecting about/customers to /supporters page #245

Merged
merged 3 commits into from Dec 11, 2016
Merged

MEB-50: Redirecting about/customers to /supporters page #245

merged 3 commits into from Dec 11, 2016

Conversation

dpmittal
Copy link
Contributor

/about/customers link is a dead link and it should be redirected to /supporters link

Issue Link : https://tickets.metabrainz.org/browse/MEB-50

@brainzbot
Copy link
Member

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')
Copy link
Contributor

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
Copy link
Contributor

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')

Copy link
Contributor

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.

@dpmittal
Copy link
Contributor Author

@uklauer I have made the changes

@chirlu
Copy link
Contributor

chirlu commented Dec 10, 2016

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.

Copy link
Contributor

@gentlecat gentlecat left a 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.

@gentlecat
Copy link
Contributor

@brainzbot, add to whitelist.

@dpmittal
Copy link
Contributor Author

dpmittal commented Dec 11, 2016

@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

@dpmittal
Copy link
Contributor Author

@gentlecat I have added the test in a new commit :)

Copy link
Contributor

@gentlecat gentlecat left a 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!

@gentlecat gentlecat merged commit 841a9b7 into metabrainz:master Dec 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants