Project

General

Profile

« Previous | Next » 

Revision 5f372104

Added by Jérôme Schneider over 13 years ago

Agenda: add appointments management

  • agenda/appointments.py: add a class to display appointments
  • agenda/managers.py: add serives maangement to OccurtenceManager
  • agenda/views.py: small fix
  • personnes/models.py: cosmetic

View differences:

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