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

WIP: Better options for creating challonge tournaments #724

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ is the backend of Siarnaq, written in Django.
`db.sqlite3`, which contains a toy database for testing. You should not commit this.
1. Run `./manage.py runserver` to turn on the server!

While developing, you may find the `api/specs/swagger-ui` endpoint userful for viewing
and querying the avaiable API.
While developing, you may find the `api/specs/swagger-ui` endpoint useful for viewing
and querying the available API. To authenticate to use this, log into some page that would use the same environment (such as the frontend homepage or admin page in the same environment), then refresh the page. Get the value of the `access` cookie used in the _header_ of the HTTP request (usually in the dev tools or network tab). Copy it, making sure not to include any spaces or punctuation from the beginning or end. Then on the `swagger-ui` endpoint, click `Authenticate` at the top, and enter the copied value there.

If you ever get your database into a really broken state, just delete `db.sqlite3`, and
start again.
Expand Down
2 changes: 2 additions & 0 deletions backend/siarnaq/bracket/challonge.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def create_tournament(tournament: Tournament, *, is_private: bool):
"tournament_type": challonge_type,
"private": is_private,
"url": challonge_id,
"game_name": "Battlecode",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes just set up our tournaments to support replay url attachments in the future, correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, will we need to merge #723 before merging this PR? b/c I see changes from camelcase to snakecase in that PR, but i'm not sure if that's a challonge v2 -> v2.1 change or challonge v1 -> v2 change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup (and also they do more things)
updated PR description for more context

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah good catch, idk if "game_name" is v2 or v2.1
I'll play it safe

"match_options": {"accept_attachments": True},
},
}
}
Expand Down