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

Remove hard-coded links to static files #1299

Merged
merged 5 commits into from Jul 3, 2018

Conversation

Projects
None yet
2 participants
@c-w
Copy link
Contributor

commented Jun 29, 2018

This change replaces all direct links to static files (such as
/static/foo/bar) with their equivalent url_for call. This introduces
consistency with code that creates links to the app's Flask routes and
also ensures that the links to the static files will always be correct
even if the application is for example hosted at a non-root path.

c-w and others added some commits Jun 29, 2018

Remove hard-coded links to static files
This change replaces all direct links to static files (such as
`/static/foo/bar`) with their equivalent `url_for` call. This introduces
consistency with code that creates links to the app's Flask routes and
also ensures that the links to the static files will always be correct
even if the application is for example hosted at a non-root path.
@colinschoen
Copy link
Member

left a comment

LGTM

Sumukh added a commit that referenced this pull request Jul 2, 2018

Upgrade to CircleCi version 2 (#1302)
CircleCI version `1.0` is deprecated and will be start rejecting jobs on August 30th. This PR migrates our workflow to `2.0`. This loosely follows the the [1.0 -> 2.0 Migration Guide](https://circleci.com/docs/2.0/migrating-from-1-2/).

This incidentally fixes the pip failures on recent CircleCI runs failing (#1299 #1301 etc) with the following error

`_NamespacePath object has no attribute sort `


Signed-off-by: Colin Schoen <cschoen@berkeley.edu>

colinschoen added some commits Jul 2, 2018

CI is failing.

Fix route not found error
The index routes are specific to various blueprints so we can't use
`url_for('.index')` in the error pages. Passing the application root as
a global context variable to the Flask templates works around this.
@c-w

This comment has been minimized.

Copy link
Contributor Author

commented Jul 3, 2018

Thanks for the review @colinschoen and the CI fixes. Build now passes.

@colinschoen
Copy link
Member

left a comment

LGTM

Thanks for the quick fix!

@colinschoen colinschoen merged commit 985fe81 into okpy:master Jul 3, 2018

3 checks passed

Travis CI - Pull Request Build Passed
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@c-w c-w deleted the c-w:bug/c-w/remove-direct-urls branch Jul 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.