-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Leaderboard group endpoints :) (#321)
* Pin to python3.10 and fix pyyaml * backend work for leaderboard groups * lol * return names * add uritemplate --------- Co-authored-by: Ada Cooke <[email protected]>
- Loading branch information
1 parent
eab79e9
commit 99e36cb
Showing
11 changed files
with
1,328 additions
and
967 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM docker.io/library/python:3.9-slim | ||
FROM docker.io/library/python:3.10-slim | ||
|
||
ARG BUILD_DEPS="build-essential" | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ description = "The Django backend for RACTF." | |
authors = ["RACTF Admins <[email protected]>"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
python = "^3.10" | ||
Django = "^4.0" | ||
django-cors-headers = "^3.11" | ||
django-redis = "^5.2" | ||
|
@@ -31,14 +31,15 @@ Twisted = "22.10.0" | |
channels-redis = "^3.2.0" | ||
requests = "^2.31.0" | ||
django-anymail = {extras = ["amazon_ses", "mailgun", "sendgrid", "console", "mailjet", "mandrill", "postal", "postmark", "sendinblue", "sparkpost"], version = "^8.5"} | ||
uritemplate = "^4.1.1" | ||
|
||
[tool.poetry.dev-dependencies] | ||
ipython = "^8.10.0" | ||
coverage = "^5.3.1" | ||
django-stubs = "^1.7.0" | ||
black = "^20.8b1" | ||
djangorestframework-stubs = "^1.3.0" | ||
PyYAML = "^5.4.1" | ||
PyYAML = "6.0.1" | ||
autoflake = "^1.4" | ||
pytest = "^6.2.4" | ||
pytest-cov = "^2.12.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/team/migrations/0005_leaderboardgroup_team_leaderboard_group.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Generated by Django 4.2.6 on 2023-10-08 17:34 | ||
|
||
import backend.validators | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django_prometheus.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("team", "0004_alter_team_name_team_team_team_username_uniq_idx"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="LeaderboardGroup", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
("name", models.CharField(max_length=31, unique=True, validators=[backend.validators.printable_name])), | ||
("description", models.TextField(blank=True, max_length=255)), | ||
("is_self_assignable", models.BooleanField(default=True)), | ||
("has_own_leaderboard", models.BooleanField(default=True)), | ||
], | ||
bases=(django_prometheus.models.ExportModelOperationsMixin("leaderboard_group"), models.Model), | ||
), | ||
migrations.AddField( | ||
model_name="team", | ||
name="leaderboard_group", | ||
field=models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="teams", | ||
to="team.leaderboardgroup", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters