Schemas
ShortUeList = TypeAdapter(list[UtbmShortUeSchema])
module-attribute
¶
UE
¶
Bases: Model
Contains infos about an UE (course).
has_user_already_commented(user)
¶
Help prevent multiples comments from the same user.
This function checks that no other comment has been posted by a specified user.
Returns:
| Type | Description |
|---|---|
bool
|
True if the user has already posted a comment on this UE, else False. |
Source code in pedagogy/models.py
UtbmShortUeSchema
¶
Bases: Schema
Short representation of an UE in the UTBM API.
Notes
This schema holds only the fields we actually need. The UTBM API returns more data than that.
WorkloadSchema
¶
Bases: Schema
SemesterUeState
¶
Bases: Schema
The state of the UE during either autumn or spring semester
UtbmFullUeSchema
¶
Bases: Schema
Long representation of an UE in the UTBM API.
SimpleUeSchema
¶
Bases: ModelSchema
Our minimal representation of an UE.
UeSchema
¶
Bases: ModelSchema
Our complete representation of an UE
UeFilterSchema
¶
Bases: FilterSchema
filter_search(value)
¶
Special filter for the search text.
It does a full text search if available.
Source code in pedagogy/schemas.py
filter_semester(value)
¶
Special filter for the semester.
If either "SPRING" or "AUTUMN" is given, UE that are available during "AUTUMN_AND_SPRING" will be filtered.