Skip to content
Snippets Groups Projects

refactor timeslot API filters

Merged Konrad Mohrfeldt requested to merge kmohrf/timeslot-filters into main
1 file
+ 10
0
Compare changes
  • Side-by-side
  • Inline
+ 10
0
@@ -184,6 +184,11 @@ class TimeSlotFilterSet(filters.FilterSet):
"If specified without a datetime value the current date and time is assumed."
),
)
starts_before = filters.DateTimeFilter(
field_name="start",
lookup_expr="lt",
help_text="Only returns timeslots that start before the specified datetime.",
)
starts_after = filters.DateTimeFilter(
field_name="start",
lookup_expr="gte",
@@ -194,6 +199,11 @@ class TimeSlotFilterSet(filters.FilterSet):
lookup_expr="lt",
help_text="Only returns timeslots that end before the specified datetime.",
)
ends_after = filters.DateTimeFilter(
field_name="end",
lookup_expr="gte",
help_text="Only returns timeslots that end at or after the specified datetime.",
)
schedule_ids = IntegerInFilter(
field_name="schedule",
help_text="Return only timeslots that belong to the specified schedule(s).",
Loading