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
Merged

Remove hard-coded links to static files #1299

merged 5 commits into from Jul 3, 2018

Conversation

@c-w
Copy link
Contributor

@c-w c-w 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 2 commits 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.
Copy link
Member

@colinschoen colinschoen left a comment

LGTM

Sumukh added a commit that referenced this issue Jul 2, 2018
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 colinschoen dismissed their stale review Jul 2, 2018

CI is failing.

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

@c-w c-w commented Jul 3, 2018

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

Copy link
Member

@colinschoen colinschoen left a comment

LGTM

Thanks for the quick fix!

@colinschoen colinschoen merged commit 985fe81 into okpy:master Jul 3, 2018
3 checks passed
@c-w c-w deleted the 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants