self.readers.add(user)
self.save()
+ def conf_duration(self):
+ return (self.date_end - self.date_begin).total_seconds()
+
class Meta(MetaCore):
db_table = app_label + '_' + 'conference'
verbose_name = _('conference')
</div>
<div id="content">
-
<table class="table1">
<tr><td class="bold">{% trans "Last name" %} : </td><td>{{ testimonial.user.last_name|upper }}</td></tr>
<tr><td class="bold">{% trans "First name" %} : </td><td>{{ testimonial.user.first_name|upper }}</td></tr>
<tr><td class="bold">{% trans "Address" %} : </td><td>{{ testimonial.user.auditor.all.0.address }} {{ testimonial.user.auditor.all.0.postal_code }} {{ testimonial.user.auditor.all.0.city }}</td></tr>
- <tr><td class="bold">Durée de la formation : </td><td>{{ conference.duration|hours }} {% trans "hours" %}</td></tr>
+ <tr><td class="bold">Durée de la formation : </td><td>{{ conference.conf_duration|fancy_seconds }} {% trans "hours" %}</td></tr>
<tr><td class="bold">{% trans "Object" %} : </td><td>{{ conference.title }}</td></tr>
<tr><td class="bold">Type de formation : </td><td>Présentiel / Webconférence</td></tr>
<tr><td class="bold">Date de la formation : </td><td>{{ first_revision.date|date:'j F Y' }}</td></tr>
conference = context['conference']
testimonials = Testimonial.objects.filter(
- conference=conference, user=self.request.user, seminar=None)
-
+ conference=conference, user=self.request.user)
if testimonials:
testimonial = testimonials[0]
context.update(get_testimonial_context(testimonial))