Skip to content

Commit

Permalink
Better options for creating challonge tournaments (#724)
Browse files Browse the repository at this point in the history
Co-authored-by: Nour Massri <mnmassri@mit.edu>
  • Loading branch information
n8kim1 and nour-massri authored Jan 22, 2025
1 parent c9ea9bf commit 8e99f80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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
4 changes: 4 additions & 0 deletions backend/siarnaq/bracket/challonge.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ def create_tournament(tournament: Tournament, *, is_private: bool):
"tournament_type": challonge_type,
"private": is_private,
"url": challonge_id,
"game_name": "Battlecode",
"match_options": {
"accept_attachments": True
}, # need to add attachments(replay url) manually
},
}
}
Expand Down

0 comments on commit 8e99f80

Please sign in to comment.