Vytištěné žádosti v inventáři
This commit is contained in:
parent
da78c5ff88
commit
6ba9d5e3cb
2 changed files with 8 additions and 0 deletions
|
@ -131,6 +131,10 @@ class Tym(models.Model):
|
|||
def vyzvednute_zadosti(self) -> QuerySet["Zadost"]:
|
||||
return self.zadosti.filter(vyzvednuta=True)
|
||||
|
||||
@property
|
||||
def vytistene_zadosti(self) -> QuerySet["Zadost"]:
|
||||
return self.zadosti.filter(vytistena=True)
|
||||
|
||||
@property
|
||||
def nevyzvednute_zadosti(self) -> QuerySet["Zadost"]:
|
||||
return self.zadosti.filter(studijni__isnull=False, vyzvednuta=False)
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
<div class="polozka_inventare"><p>{% for _ in ""|center:tym.ovesna_kase %}🥘{% endfor %}</p></div>
|
||||
{% endif %}
|
||||
|
||||
{% for zadost in tym.vytistene_zadosti %}
|
||||
<div class="polozka_inventare"><p>Vytištěná {{ zadost }}</p></div>
|
||||
{% endfor %}
|
||||
|
||||
{% for zadost in tym.vyzvednute_zadosti %}
|
||||
<div class="polozka_inventare"><p>{% if zadost.plati %}Kladná{% else %}Záporná{% endif %} odpověď na {{ zadost }}</p></div>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue