Skip to content

Commit 8e99f80

Browse files
n8kim1nour-massri
andauthored
Better options for creating challonge tournaments (#724)
Co-authored-by: Nour Massri <[email protected]>
1 parent c9ea9bf commit 8e99f80

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

backend/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ is the backend of Siarnaq, written in Django.
1111
`db.sqlite3`, which contains a toy database for testing. You should not commit this.
1212
1. Run `./manage.py runserver` to turn on the server!
1313

14-
While developing, you may find the `api/specs/swagger-ui` endpoint userful for viewing
15-
and querying the avaiable API.
14+
While developing, you may find the `api/specs/swagger-ui` endpoint useful for viewing
15+
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.
1616

1717
If you ever get your database into a really broken state, just delete `db.sqlite3`, and
1818
start again.

backend/siarnaq/bracket/challonge.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ def create_tournament(tournament: Tournament, *, is_private: bool):
6262
"tournament_type": challonge_type,
6363
"private": is_private,
6464
"url": challonge_id,
65+
"game_name": "Battlecode",
66+
"match_options": {
67+
"accept_attachments": True
68+
}, # need to add attachments(replay url) manually
6569
},
6670
}
6771
}

0 commit comments

Comments
 (0)