Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pridaný grade admin #435

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Pridaný grade admin
kovacspe committed Nov 23, 2024
commit 76d16e749dfa566bf30ba8e6de33555af9a63270
12 changes: 11 additions & 1 deletion competition/admin.py
Original file line number Diff line number Diff line change
@@ -2,11 +2,21 @@
from django.http import HttpResponseRedirect

from competition.models import (Comment, Competition, Event, EventRegistration,
LateTag, Problem, ProblemCorrection,
Grade, LateTag, Problem, ProblemCorrection,
Publication, RegistrationLink, Semester,
Series, Solution)


@admin.register(Grade)
class GradeAdmin(admin.ModelAdmin):
list_display = (
'name',
'tag',
'years_until_graduation',
'is_active'
)


@admin.register(Competition)
class CompetitionAdmin(admin.ModelAdmin):
list_display = (
4 changes: 2 additions & 2 deletions competition/models.py
Original file line number Diff line number Diff line change
@@ -810,8 +810,8 @@ def __str__(self):
class ProblemCorrection(models.Model):
# TODO: Add images
class Meta:
verbose_name = 'opravenie úlohy'
verbose_name_plural = 'opravene ulohy'
verbose_name = 'Opravenie úlohy'
verbose_name_plural = 'Opravené úlohy'

problem = models.OneToOneField(
Problem,