Révision 784abc51
Ajouté par Serghei Mihai (congés, retour 15/05) il y a presque 10 ans
calebasse/agenda/appointments.py | ||
---|---|---|
203 | 203 |
continue |
204 | 204 |
start_time = interval_set.lower_bound() |
205 | 205 |
end_time = interval_set.upper_bound() |
206 |
services = [s.slug for s in time_table.services.all() if s != service] |
|
206 | 207 |
appointment = Appointment() |
208 |
appointment.other_services_names = services |
|
207 | 209 |
appointment.init_start_stop(u"Arrivée", start_time) |
208 | 210 |
activity['arrival'] = start_time |
209 |
appointment.weight = -1
|
|
211 |
appointment.weight = 1 |
|
210 | 212 |
appointments.append(appointment) |
211 | 213 |
appointment = Appointment() |
212 | 214 |
appointment.init_start_stop(u"Départ", end_time) |
215 |
appointment.other_services_names = services |
|
213 | 216 |
activity['departure'] = end_time |
214 |
appointment.weight = 1 |
|
217 |
appointment.weight = -1
|
|
215 | 218 |
appointments.append(appointment) |
216 | 219 |
|
217 | 220 |
return activity, sorted(appointments, key=lambda app: (app.begin_time, app.weight, app.event_id)) |
Formats disponibles : Unified diff
agenda: display the arrivals and departure for other services
Closes #2532