Project

General

Profile

« Previous | Next » 

Revision 8d79913e

Added by Benjamin Dauvergne over 12 years ago

improve display code for the EventAct model

View differences:

calebasse/actes/models.py
94 94
    convocation_sent = models.BooleanField(blank=True,
95 95
            verbose_name=u'Convoqué')
96 96

  
97
    def __unicode__(self):
98
        return 'Rdv le {0} de {1} avec {2} pour {3}'.format(
99
                self.occurrence_set.all()[0].start_time, self.patient,
100
                ', '.join(map(unicode, self.participants.all())), self.act_type)
101

  
102
    def __repr__(self):
103
        return '<%s %r %r>' % (self.__class__.__name__, unicode(self), self.id)
104

  
105
    class Meta:
106
        verbose_name = 'Rendez-vous patient'
107
        verbose_name_plural = 'Rendez-vous patient'
108
        ordering = ['-date', 'patient']

Also available in: Unified diff