497 |
497 |
|
498 |
498 |
if 'date_end' in request.GET:
|
499 |
499 |
entries = entries.filter(
|
500 |
500 |
start_datetime__lt=make_aware(
|
501 |
501 |
datetime.datetime.combine(parse_date(request.GET['date_end']), datetime.time(0, 0))
|
502 |
502 |
)
|
503 |
503 |
)
|
504 |
504 |
|
505 |
|
response = {'data': [get_event_detail(request, x, agenda=agenda) for x in entries]}
|
|
505 |
response = {
|
|
506 |
'data': [get_event_detail(request, x, agenda=agenda) for x in entries],
|
|
507 |
}
|
506 |
508 |
return Response(response)
|
507 |
509 |
|
508 |
510 |
|
509 |
511 |
datetimes = Datetimes.as_view()
|
510 |
512 |
|
511 |
513 |
|
512 |
514 |
class MeetingDatetimes(APIView):
|
513 |
515 |
permission_classes = ()
|
... | ... | |
611 |
613 |
It MUST be a garanty of SharedTimePeriod.get_time_slots(),
|
612 |
614 |
!!!
|
613 |
615 |
"""
|
614 |
616 |
return '%s:%s' % (
|
615 |
617 |
meeting_type.slug,
|
616 |
618 |
start_datetime.strftime('%Y-%m-%d-%H%M'),
|
617 |
619 |
)
|
618 |
620 |
|
619 |
|
response = {
|
620 |
|
'data': [
|
621 |
|
{
|
|
621 |
data = []
|
|
622 |
for slot in generator_of_unique_slots:
|
|
623 |
# we do not have the := operator, so we do that
|
|
624 |
for slot_id in [make_id(slot.start_datetime, meeting_type)]:
|
|
625 |
data.append({
|
622 |
626 |
'id': slot_id,
|
623 |
627 |
'datetime': format_response_datetime(slot.start_datetime),
|
624 |
628 |
'text': date_format(slot.start_datetime, format='DATETIME_FORMAT'),
|
625 |
629 |
'disabled': bool(slot.full),
|
626 |
630 |
'api': {'fillslot_url': fillslot_url.replace(fake_event_identifier, slot_id)},
|
627 |
|
}
|
628 |
|
for slot in generator_of_unique_slots
|
629 |
|
# we do not have the := operator, so we do that
|
630 |
|
for slot_id in [make_id(slot.start_datetime, meeting_type)]
|
631 |
|
]
|
|
631 |
})
|
|
632 |
|
|
633 |
response = {
|
|
634 |
'data': data,
|
632 |
635 |
}
|
633 |
636 |
return Response(response)
|
634 |
637 |
|
635 |
638 |
|
636 |
639 |
meeting_datetimes = MeetingDatetimes.as_view()
|
637 |
640 |
|
638 |
641 |
|
639 |
642 |
class MeetingList(APIView):
|
640 |
|
-
|