Skip to content
Snippets Groups Projects

Turn group week view into general week view.

Merged Tom Teichler requested to merge 34-turn-group-week-view-into-general-week-view into master
Compare and
2 files
+ 89
33
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -2,7 +2,8 @@ from django import forms
from django.db.models import Count
from django.utils.translation import ugettext_lazy as _
from biscuit.core.models import Group
from biscuit.core.models import Group, Person
from biscuit.apps.chronos.models import Room
from .models import LessonDocumentation, PersonalNote
@@ -33,6 +34,14 @@ class SelectForm(forms.Form):
group = forms.ModelChoiceField(
queryset=Group.objects.annotate(lessons_count=Count('lessons')).filter(lessons_count__gt=0),
label=_('Group'), required=False)
teacher = forms.ModelChoiceField(
queryset=Person.objects.annotate(lessons_count=Count(
'lessons')).filter(lessons_count__gt=0),
label=_('Teacher'), required=False)
room = forms.ModelChoiceField(
queryset=Room.objects.annotate(lessons_count=Count(
'lesson_periods')).filter(lessons_count__gt=0),
label=_('Room'), required=False)
PersonalNoteFormSet = forms.modelformset_factory(
Loading