Skip to content
Snippets Groups Projects
Verified Commit 1b2f90e2 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Document injected methods.

parent a07a82d0
No related branches found
No related tags found
No related merge requests found
...@@ -5,14 +5,44 @@ from .models import Lesson, LessonPeriod ...@@ -5,14 +5,44 @@ from .models import Lesson, LessonPeriod
@Person.property @Person.property
def lessons_as_participant(self): def lessons_as_participant(self):
""" Return a `QuerySet` containing all `Lesson`s this person
participates in (as student).
.. note:: Only available when BiscuIT-App-Chronos is installed.
:Date: 2019-11-07
:Authors:
- Dominik George <dominik.george@teckids.org>
"""
return Lesson.objects.filter(groups__members=self) return Lesson.objects.filter(groups__members=self)
@Person.property @Person.property
def lesson_periods_as_participant(self): def lesson_periods_as_participant(self):
""" Return a `QuerySet` containing all `LessonPeriod`s this person
participates in (as student).
.. note:: Only available when BiscuIT-App-Chronos is installed.
:Date: 2019-11-07
:Authors:
- Dominik George <dominik.george@teckids.org>
"""
return LessonPeriod.objects.filter(lesson__groups__members=self) return LessonPeriod.objects.filter(lesson__groups__members=self)
@Person.property @Person.property
def lesson_periods_as_teacher(self): def lesson_periods_as_teacher(self):
""" Return a `QuerySet` containing all `Lesson`s this person
gives (as teacher).
.. note:: Only available when BiscuIT-App-Chronos is installed.
:Date: 2019-11-07
:Authors:
- Dominik George <dominik.george@teckids.org>
"""
return LessonPeriod.objects.filter(lesson__teachers=self) return LessonPeriod.objects.filter(lesson__teachers=self)
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