|
@ -22,17 +22,26 @@ class KorekturyListView(generic.ListView): |
|
|
template_name = 'korektury/seznam.html' |
|
|
template_name = 'korektury/seznam.html' |
|
|
|
|
|
|
|
|
class KorekturyAktualniListView(KorekturyListView): |
|
|
class KorekturyAktualniListView(KorekturyListView): |
|
|
def __init__ (self): |
|
|
def get_queryset(self, *args, **kwargs): |
|
|
self.queryset=self.get_queryset().exclude(status="zastarale") |
|
|
queryset=super(KorekturyAktualniListView,self).get_queryset() |
|
|
|
|
|
queryset=queryset.exclude(status="zastarale") |
|
|
|
|
|
return queryset |
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
def get_context_data(self, **kwargs): |
|
|
context = super(KorekturyAktualniListView,self).get_context_data(**kwargs) |
|
|
context = super(KorekturyAktualniListView,self).get_context_data(**kwargs) |
|
|
context['aktualni'] = True |
|
|
context['selected'] = 'aktualni' |
|
|
return context |
|
|
return context |
|
|
|
|
|
|
|
|
class KorekturyZastaraleListView(KorekturyListView): |
|
|
class KorekturyZastaraleListView(KorekturyListView): |
|
|
def __init__ (self): |
|
|
def get_queryset(self, *args, **kwargs): |
|
|
self.queryset=self.get_queryset().filter(status="zastarale") |
|
|
queryset=super(KorekturyZastaraleListView,self).get_queryset() |
|
|
|
|
|
queryset=queryset.filter(status="zastarale") |
|
|
|
|
|
return queryset |
|
|
|
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
|
|
|
context = super(KorekturyZastaraleListView,self).get_context_data(**kwargs) |
|
|
|
|
|
context['selected'] = 'zastarale' |
|
|
|
|
|
return context |
|
|
|
|
|
|
|
|
### Korektury |
|
|
### Korektury |
|
|
class KorekturyView(generic.TemplateView): |
|
|
class KorekturyView(generic.TemplateView): |
|
|