Skip to content
Snippets Groups Projects
Verified Commit cb454a99 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Add ModelForm for LessonSubstitution.

parent da1012c3
No related branches found
No related tags found
1 merge request!9WIP: Add way to edit substitution
......@@ -17,3 +17,8 @@ class SelectForm(forms.Form):
room = forms.ModelChoiceField(
queryset=Room.objects.annotate(lessons_count=Count('lesson_periods')).filter(lessons_count__gt=0),
label=_('Room'), required=False)
class LessonSubstitution(forms.ModelForm):
class Meta:
model = LessonSubstitution
fields = ['week', 'lesson_period', 'subject', 'teachers', 'room']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment