Merge branch 'sifrovacka_sifry-jako-text' into sifrovacka_seznamy
This commit is contained in:
commit
56944d164f
2 changed files with 37 additions and 4 deletions
sifrovacka
33
sifrovacka/migrations/0007_alter_napoveda_sifra_and_more.py
Normal file
33
sifrovacka/migrations/0007_alter_napoveda_sifra_and_more.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Generated by Django 4.2.18 on 2025-03-19 20:12
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('sifrovacka', '0006_personalni_post_migrate'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='napoveda',
|
||||
name='sifra',
|
||||
field=models.CharField(max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='napovezenoucastnikovi',
|
||||
name='sifra',
|
||||
field=models.CharField(max_length=255, verbose_name='Šifra'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='odpoveducastnika',
|
||||
name='sifra',
|
||||
field=models.CharField(max_length=255, verbose_name='Šifra'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='spravnaodpoved',
|
||||
name='sifra',
|
||||
field=models.CharField(max_length=255),
|
||||
),
|
||||
]
|
|
@ -10,14 +10,14 @@ class OdpovedUcastnika(models.Model):
|
|||
|
||||
resitel = models.ForeignKey(Resitel, blank=False, null=False, on_delete=models.CASCADE)
|
||||
odpoved = models.TextField("Tajenka bez diakritiky", blank=False, null=False,)
|
||||
sifra = models.IntegerField("Číslo šifry", blank=False, null=False,)
|
||||
sifra = models.CharField("Šifra", max_length=255, blank=False, null=False,)
|
||||
timestamp = models.DateTimeField("Timestamp", blank=False, null=False, default=timezone.now)
|
||||
uspech = models.BooleanField("Úspěch", blank=False, null=False, default=False)
|
||||
|
||||
|
||||
class SpravnaOdpoved(models.Model):
|
||||
odpoved = models.TextField(blank=False, null=False,)
|
||||
sifra = models.IntegerField(blank=False, null=False,)
|
||||
sifra = models.CharField(max_length=255, blank=False, null=False,)
|
||||
skryty_text = models.TextField(blank=False, null=False,)
|
||||
|
||||
def __str__(self):
|
||||
|
@ -29,13 +29,13 @@ class NapovezenoUcastnikovi(models.Model):
|
|||
ordering = ["-timestamp"]
|
||||
|
||||
resitel = models.ForeignKey(Resitel, blank=False, null=False, on_delete=models.CASCADE)
|
||||
sifra = models.IntegerField("Číslo šifry", blank=False, null=False,)
|
||||
sifra = models.CharField("Šifra", max_length=255, blank=False, null=False,)
|
||||
timestamp = models.DateTimeField("Timestamp", blank=False, null=False, default=timezone.now)
|
||||
|
||||
|
||||
class Napoveda(models.Model):
|
||||
text = models.TextField(blank=False, null=False,)
|
||||
sifra = models.IntegerField(blank=False, null=False,)
|
||||
sifra = models.CharField(max_length=255, blank=False, null=False,)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.sifra}: {self.text}"
|
||||
|
|
Loading…
Reference in a new issue