Skip to content

Commit

Permalink
Add location and competition type short name
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe committed May 23, 2024
1 parent 83f5ee6 commit eb28593
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
18 changes: 12 additions & 6 deletions competition/fixtures/competition_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,48 @@
"model": "competition.CompetitionType",
"pk": 0,
"fields": {
"name": "Seminár"
"name": "Seminár",
"short_name": "seminár"
}
},
{
"model": "competition.CompetitionType",
"pk": 1,
"fields": {
"name": "Jednodňová tímová súťaž"
"name": "Jednodňová tímová súťaž",
"short_name": "súťaž"
}
},
{
"model": "competition.CompetitionType",
"pk": 2,
"fields": {
"name": "Tábor"
"name": "Tábor",
"short_name": "tábor"
}
},
{
"model": "competition.CompetitionType",
"pk": 3,
"fields": {
"name": "Šifrovacia hra"
"name": "Šifrovacia hra",
"short_name": "šifrovačka"
}
},
{
"model": "competition.CompetitionType",
"pk": 4,
"fields": {
"name": "Robotická tímová súťaž"
"name": "Robotická tímová súťaž",
"short_name": "súťaž"
}
},
{
"model": "competition.CompetitionType",
"pk": 5,
"fields": {
"name": "Individuálna online súťaž"
"name": "Individuálna online súťaž",
"short_name": "súťaž"
}
}
]
6 changes: 4 additions & 2 deletions competition/fixtures/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"year": 19,
"school_year": "2021/2022",
"start": "2022-06-01T20:00:00+02:00",
"end": "2022-06-02T20:00:00+02:00"
"end": "2022-06-02T20:00:00+02:00",
"location": "v Košiciach"
}
},
{
Expand Down Expand Up @@ -41,7 +42,8 @@
"school_year": "2022/2023",
"start": "2023-06-01T20:00:00+02:00",
"end": "2025-06-01T20:00:00+02:00",
"registration_link": 3
"registration_link": 3,
"location": "v Košiciach"
}
}

Expand Down
4 changes: 4 additions & 0 deletions competition/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class Meta:
verbose_name_plural = 'Typy súťaží'

name = models.CharField('typ súťaže', max_length=200)
short_name = models.CharField(
verbose_name='Krátky jednoslovný názov', max_length=32)

def __str__(self):
return self.name
Expand Down Expand Up @@ -161,6 +163,8 @@ class Meta:

start = models.DateTimeField(verbose_name='dátum začiatku súťaže')
end = models.DateTimeField(verbose_name='dátum konca súťaže')
location = models.TextField(
verbose_name='Miesto konania', help_text='Napríklad "v Košiciach"', null=True, blank=True)
additional_name = models.CharField(
max_length=50, verbose_name='Prívlastok súťaže', null=True, blank=True)

Expand Down

0 comments on commit eb28593

Please sign in to comment.