Browse Source

Zrušen VložBodyView

Stejně nic moc nedělal...
export_seznamu_prednasek
Pavel "LEdoian" Turinsky 4 years ago
parent
commit
c77eb932f8
  1. 5
      seminar/urls.py
  2. 14
      seminar/views/views_all.py

5
seminar/urls.py

@ -123,11 +123,6 @@ urlpatterns = [
org_required(views.soustredeniObalkyView), org_required(views.soustredeniObalkyView),
name='seminar_soustredeni_obalky' name='seminar_soustredeni_obalky'
), ),
path(
'org/vloz_body/<int:tema>/',
org_required(views.VlozBodyView.as_view()),
name='seminar_org_vlozbody'
),
# příprava na nestatický orgorozcestník # příprava na nestatický orgorozcestník
path( path(
'org/rozcestnik/', 'org/rozcestnik/',

14
seminar/views/views_all.py

@ -63,20 +63,6 @@ from seminar.utils import aktivniResitele, resi_v_rocniku
def get_problemy_k_tematu(tema): def get_problemy_k_tematu(tema):
return Problem.objects.filter(nadproblem = tema) return Problem.objects.filter(nadproblem = tema)
class VlozBodyView(generic.ListView):
template_name = 'seminar/org/vloz_body.html'
def get_queryset(self):
self.tema = get_object_or_404(Problem,id=self.kwargs['tema'])
print(self.tema)
self.problemy = Problem.objects.filter(nadproblem = self.tema)
print(self.problemy)
self.reseni = Reseni.objects.filter(problem__in=self.problemy)
print(self.reseni)
return self.reseni
class ObalkovaniView(generic.ListView): class ObalkovaniView(generic.ListView):
template_name = 'seminar/org/obalkovani.html' template_name = 'seminar/org/obalkovani.html'

Loading…
Cancel
Save