This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/user-task-points
- Loading branch information
Showing
15 changed files
with
407 additions
and
15 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from django.urls import path | ||
|
||
from apps.submissions.views import SubmissionListView | ||
|
||
app_name = "submissions" | ||
|
||
urlpatterns = [path("", SubmissionListView.as_view(), name="list")] |
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,21 @@ | ||
from typing import TYPE_CHECKING | ||
|
||
from django.db.models import QuerySet | ||
from django.views.generic import ListView | ||
|
||
from apps.submissions.models import Submission | ||
|
||
if TYPE_CHECKING: | ||
SubmissionViewBase = ListView[Submission] | ||
else: | ||
SubmissionViewBase = ListView | ||
|
||
|
||
class SubmissionListView(SubmissionViewBase): | ||
model = Submission | ||
template_name = "submissions/list.html" | ||
context_object_name = "submissions" | ||
paginate_by = 10 | ||
|
||
def get_queryset(self) -> QuerySet[Submission]: | ||
return Submission._default_manager.all().order_by("-created_at") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 4.2.7 on 2023-12-01 18:09 | ||
|
||
import django.contrib.postgres.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("tasks", "0004_task_input_file_task_output_file"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="task", | ||
name="constraints", | ||
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.CharField(max_length=256), | ||
default=list, | ||
size=None, | ||
), | ||
), | ||
] |
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
Oops, something went wrong.