Skip to content
Snippets Groups Projects
Verified Commit 6f73dfb2 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Add missing doc strings for forms and helpers

parent f2e9c34f
No related branches found
No related tags found
1 merge request!152Overview of all register objects
Pipeline #6462 passed
......@@ -262,6 +262,8 @@ class GroupRoleAssignmentEditForm(forms.ModelForm):
class FilterRegisterObjectForm(forms.Form):
"""Form for filtering register objects in ``RegisterObjectTable``."""
layout = Layout(
Row("school_term", "date_start", "date_end"), Row("has_documentation", "group", "subject")
)
......@@ -317,4 +319,6 @@ class FilterRegisterObjectForm(forms.Form):
class RegisterObjectActionForm(ListActionForm):
"""Action form for managing register objects for use with ``RegisterObjectTable``."""
actions = [send_request_to_check_entry]
......@@ -114,6 +114,8 @@ class ShowGroupRolesInLessonView(BooleanPreference):
@person_preferences_registry.register
class RegisterObjectsTableItemsPerPage(IntegerPreference):
"""Preference how many items are shown per page in ``RegisterObjectTable``."""
section = alsijil
name = "register_objects_table_items_per_page"
default = 100
......
......@@ -111,6 +111,7 @@ def _filter_register_objects_by_dict(
register_objects: QuerySet[Union[LessonPeriod, Event, ExtraLesson]],
label_: str,
) -> QuerySet[Union[LessonPeriod, Event, ExtraLesson]]:
"""Filter register objects by a dictionary generated through ``FilterRegisterObjectForm``."""
if label_ == LessonPeriod.label_:
register_objects = register_objects.filter(
lesson__validity__school_term=filter_dict.get("school_term")
......
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