forked from gergely/calendar-social
[Refactor] Change GregorianCalendar.day_events() to a static method
It takes a date as its parameter, and doesn’t use the class’ timestamp, so there’s no point making it an instance method.
This commit is contained in:
parent
894024aa88
commit
9dd2a1120f
@ -142,7 +142,8 @@ class GregorianCalendar(CalendarSystem):
|
||||
|
||||
return now >= month_start_timestamp and now < month_end_timestamp
|
||||
|
||||
def day_events(self, date, user=None):
|
||||
@staticmethod
|
||||
def day_events(date, user=None):
|
||||
from ..models import Event
|
||||
|
||||
events = Event.query
|
||||
|
Loading…
Reference in New Issue
Block a user