Revision 5f372104
Added by Jérôme Schneider over 12 years ago
calebasse/agenda/managers.py | ||
---|---|---|
81 | 81 |
|
82 | 82 |
#use_for_related_fields = True |
83 | 83 |
|
84 |
def daily_occurrences(self, date=None, participants=None):
|
|
84 |
def daily_occurrences(self, date, participants=None, services=None):
|
|
85 | 85 |
''' |
86 | 86 |
Returns a queryset of for instances that have any overlap with a |
87 | 87 |
particular day. |
... | ... | |
110 | 110 |
) |
111 | 111 |
|
112 | 112 |
if participants: |
113 |
return qs.filter(event__participants__in=participants) |
|
114 |
else: |
|
115 |
return qs |
|
113 |
qs = qs.filter(event__participants__in=participants) |
|
114 |
if services: |
|
115 |
qs = qs.filter(services__in=services) |
|
116 |
return qs |
|
116 | 117 |
|
117 | 118 |
def daily_disponiblity(self, date, participants): |
118 | 119 |
start_datetime = datetime(date.year, date.month, date.day, 8, 0) |
Also available in: Unified diff
Agenda: add appointments management