Revision 01b95bad
Added by Serghei Mihai about 9 years ago
calebasse/agenda/appointments.py | ||
---|---|---|
191 | 191 |
appointment.type = 'busy-elsewhere' |
192 | 192 |
appointment.other_services_names = [s.slug for s in services if s != service] |
193 | 193 |
appointments.append(appointment) |
194 |
print "time tables: %s" % time_tables |
|
194 | 195 |
for time_table in time_tables: |
195 | 196 |
interval_set = IntervalSet.between(time_table.to_interval(date).lower_bound.time(), |
196 | 197 |
time_table.to_interval(date).upper_bound.time()) |
... | ... | |
214 | 215 |
appointment.other_services_names = services |
215 | 216 |
appointment.init_start_stop(u"Arrivée", start_time, appointment_type) |
216 | 217 |
activity['arrival'] = start_time |
217 |
appointment.weight = -1
|
|
218 |
appointment.weight = 1 |
|
218 | 219 |
appointments.append(appointment) |
219 | 220 |
appointment = Appointment() |
220 | 221 |
appointment.init_start_stop(u"Départ", end_time, appointment_type) |
221 | 222 |
appointment.other_services_names = services |
222 | 223 |
activity['departure'] = end_time |
223 |
appointment.weight = 1 |
|
224 |
appointment.weight = -1
|
|
224 | 225 |
appointments.append(appointment) |
225 | 226 |
|
226 | 227 |
return activity, sorted(appointments, key=lambda app: (app.begin_time, app.weight, app.event_id)) |
Also available in: Unified diff
departures displayed before arrivals in timetables
Closes #5465