From: Yoan Le Clanche Date: Mon, 21 Aug 2023 11:59:51 +0000 (+0200) Subject: Add download_url to Testimonial model X-Git-Tag: 2.8.1-pro~28 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f4d7c10ad8a6926e27954f695e95f9bbfbf951e5;p=teleforma.git Add download_url to Testimonial model --- diff --git a/teleforma/models/pro.py b/teleforma/models/pro.py index 36b2eaee..e935cad0 100644 --- a/teleforma/models/pro.py +++ b/teleforma/models/pro.py @@ -454,6 +454,10 @@ class Testimonial(models.Model): title = ' - '.join([self.user.first_name + ' ' + self.user.last_name, str(date)]) return title + + def download_url(self): + url = reverse('teleforma-seminar-testimonial-download', kwargs={'pk':self.seminar.id}) + return "%s%s" % (settings.TELEFORMA_MASTER_HOST, url) def save(self, **kwargs): if not self.title: