Revision 5f372104
Added by Jérôme Schneider over 13 years ago
| calebasse/agenda/managers.py | ||
|---|---|---|
|
|
||
|
#use_for_related_fields = True
|
||
|
|
||
|
def daily_occurrences(self, date=None, participants=None):
|
||
|
def daily_occurrences(self, date, participants=None, services=None):
|
||
|
'''
|
||
|
Returns a queryset of for instances that have any overlap with a
|
||
|
particular day.
|
||
| ... | ... | |
|
)
|
||
|
|
||
|
if participants:
|
||
|
return qs.filter(event__participants__in=participants)
|
||
|
else:
|
||
|
return qs
|
||
|
qs = qs.filter(event__participants__in=participants)
|
||
|
if services:
|
||
|
qs = qs.filter(services__in=services)
|
||
|
return qs
|
||
|
|
||
|
def daily_disponiblity(self, date, participants):
|
||
|
start_datetime = datetime(date.year, date.month, date.day, 8, 0)
|
||
Also available in: Unified diff
Agenda: add appointments management