Project

General

Profile

« Previous | Next » 

Revision d86f6cd6

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

agenda: disable OrderedDict to be compatible with Python < 2.7

View differences:

calebasse/agenda/templates/agenda/service-activity.html
31 31
      <tr> <th>Heure</th> <th>Durée</th> <th>Patient</th> <th>Thérapeute(s)</th> <th>Acte</th> </tr>
32 32
    </thead>
33 33
    <tbody>
34
      {% for time, row_appointments in appointments_times.items %}
34
      {% for row_appointments in appointments_times %}
35 35
      <tr class="hour-change">
36
        <td class="hour"  rowspan="{{ row_appointments.row }}">{{ time }}</td>
37
        {% for appointment in row_appointments.appointments %}
36
        <td class="hour"  rowspan="{{ row_appointments.1.row }}">{{ row_appointments.0 }}</td>
37
        {% for appointment in row_appointments.1.appointments %}
38 38
        {% if forloop.counter != 1 %}
39 39
        <tr>
40 40
          {% endif %}
calebasse/agenda/views.py
1 1
import datetime
2
import collections
3 2

  
4 3
from django.db.models import Q
5 4
from django.shortcuts import redirect
......
106 105
            appointment['act'] = event_act.act_type.name
107 106
            appointments_times[start_time]['row'] += 1
108 107
            appointments_times[start_time]['appointments'].append(appointment)
109
        context['appointments_times'] = collections.OrderedDict(sorted(appointments_times.items()))
108
        context['appointments_times'] = sorted(appointments_times.items())
110 109
        return context
111 110

  
112 111

  

Also available in: Unified diff