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

Rename queryset methods for announcements

at_date → on_date
in_days → within_days
parent 855137e4
No related branches found
No related tags found
1 merge request!184Improve announcement queries
Pipeline #1078 failed
......@@ -302,7 +302,7 @@ class AnnouncementQuerySet(models.QuerySet):
return announcements
def at_date(self,when: Optional[date] = None) -> models.QuerySet:
def on_date(self, when: Optional[date] = None) -> models.QuerySet:
""" Get all announcements at a certain date """
when = when or timezone.datetime.now().date()
......@@ -312,7 +312,7 @@ class AnnouncementQuerySet(models.QuerySet):
return announcements
def in_days(self, start: date, stop: date) -> models.QuerySet:
def within_days(self, start: date, stop: date) -> models.QuerySet:
""" Get all announcements valid for a set of days """
# Get announcements
......
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