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 documentation/sprint-reuniao
- Loading branch information
Showing
33 changed files
with
798 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
release: python manage.py migrate | ||
web: gunicorn server.wsgi |
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,16 @@ | ||
{ | ||
"repository": "https://github.com/unb-mds/2023-2-Squad06", | ||
"addons": ["heroku-postgresql:mini", "papertrail:choklad"], | ||
"buildpacks": [ | ||
{ | ||
"url": "https://github.com/moneymeets/python-poetry-buildpack.git" | ||
}, | ||
{ | ||
"url": "heroku/python" | ||
} | ||
], | ||
"env": { | ||
"PYTHON_RUNTIME_VERSION": "3.11.5", | ||
"POETRY_VERSION": "1.6.1" | ||
} | ||
} |
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,34 @@ | ||
from typing import TYPE_CHECKING | ||
|
||
from django.contrib.admin import ModelAdmin, register | ||
from django.forms import CharField, ModelForm, Textarea | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
from apps.submissions.models import Submission | ||
|
||
if TYPE_CHECKING: | ||
SubmissionAdminBase = ModelAdmin[Submission] | ||
SubmissionModelFormBase = ModelForm[Submission] | ||
else: | ||
SubmissionAdminBase = ModelAdmin | ||
SubmissionModelFormBase = ModelForm | ||
|
||
|
||
class SubmissionModelForm(SubmissionModelFormBase): | ||
code = CharField(widget=Textarea(attrs={"rows": 20, "cols": 80})) | ||
|
||
class Meta: | ||
model = Submission | ||
fields = "__all__" | ||
|
||
|
||
@register(Submission) | ||
class SubmissionAdmin(SubmissionAdminBase): | ||
form = SubmissionModelForm | ||
|
||
list_display = ("__str__", "author", "task") | ||
list_filter = ("author", "task", "created_at") | ||
|
||
fieldsets = [ | ||
(_("Details"), {"fields": ("author", "task", "code", "status")}) | ||
] |
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,10 @@ | ||
from django.forms import CharField, Form, Textarea | ||
|
||
|
||
class SubmissionForm(Form): | ||
code = CharField( | ||
label="Source Code", | ||
required=True, | ||
min_length=15, | ||
widget=Textarea(attrs={"rows": 12, "style": "width: 100%;"}), | ||
) |
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,34 @@ | ||
# Generated by Django 4.2.7 on 2023-11-26 22:26 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("submissions", "0002_alter_submission_code"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="submission", | ||
name="status", | ||
field=models.TextField( | ||
choices=[ | ||
("WJ", "Waiting judge"), | ||
("JG", "Judging"), | ||
("AC", "Accepted"), | ||
("WA", "Wrong answer"), | ||
("RE", "Runtime error"), | ||
("TLE", "Time limit exceeded"), | ||
("MLE", "Memory limit exceeded"), | ||
("CE", "Compilation error"), | ||
("IE", "Internal error"), | ||
("UE", "Unknown error"), | ||
("SE", "Submission error"), | ||
("PE", "Presentation error"), | ||
], | ||
default="WJ", | ||
max_length=3, | ||
), | ||
), | ||
] |
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
Oops, something went wrong.