|
|
@ -442,17 +442,17 @@ class OdmenyView(generic.TemplateView): |
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
|
context = super().get_context_data(**kwargs) |
|
|
|
fromcislo = Cislo.objects.get(rocnik=self.kwargs.get('frocnik'), poradi=self.kwargs.get('fcislo')) |
|
|
|
tocislo = Cislo.objects.get(rocnik=self.kwargs.get('trocnik'), poradi=self.kwargs.get('tcislo')) |
|
|
|
fromcislo = get_object_or_404(Cislo, rocnik=self.kwargs.get('frocnik'), poradi=self.kwargs.get('fcislo')) |
|
|
|
tocislo = get_object_or_404(Cislo, rocnik=self.kwargs.get('trocnik'), poradi=self.kwargs.get('tcislo')) |
|
|
|
resitele = aktivniResitele(tocislo) |
|
|
|
|
|
|
|
def get_diff(from_deadline: Deadline, to_deadline: Deadline): |
|
|
|
frombody = body_resitelu(resitele=resitele, jen_verejne=False, do=from_deadline) |
|
|
|
tobody = body_resitelu(resitele=resitele, jen_verejne=False, do=to_deadline) |
|
|
|
outlist = [] |
|
|
|
for (aid, tbody) in tobody.items(): |
|
|
|
fbody = frombody.get(aid,0) |
|
|
|
resitel = Resitel.objects.get(pk=aid) |
|
|
|
for resitel in resitele: |
|
|
|
fbody = frombody.get(resitel.id, 0) |
|
|
|
tbody = tobody.get(resitel.id, 0) |
|
|
|
ftitul = resitel.get_titul(fbody) |
|
|
|
ttitul = resitel.get_titul(tbody) |
|
|
|
if ftitul != ttitul: |
|
|
|