Skip to content

Commit 76d16e7

Browse files
committed
Pridaný grade admin
1 parent a0392ec commit 76d16e7

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

competition/admin.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22
from django.http import HttpResponseRedirect
33

44
from competition.models import (Comment, Competition, Event, EventRegistration,
5-
LateTag, Problem, ProblemCorrection,
5+
Grade, LateTag, Problem, ProblemCorrection,
66
Publication, RegistrationLink, Semester,
77
Series, Solution)
88

99

10+
@admin.register(Grade)
11+
class GradeAdmin(admin.ModelAdmin):
12+
list_display = (
13+
'name',
14+
'tag',
15+
'years_until_graduation',
16+
'is_active'
17+
)
18+
19+
1020
@admin.register(Competition)
1121
class CompetitionAdmin(admin.ModelAdmin):
1222
list_display = (

competition/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,8 @@ def __str__(self):
810810
class ProblemCorrection(models.Model):
811811
# TODO: Add images
812812
class Meta:
813-
verbose_name = 'opravenie úlohy'
814-
verbose_name_plural = 'opravene ulohy'
813+
verbose_name = 'Opravenie úlohy'
814+
verbose_name_plural = 'Opravené úlohy'
815815

816816
problem = models.OneToOneField(
817817
Problem,

0 commit comments

Comments
 (0)