]> git.parisson.com Git - teleforma.git/commitdiff
Add download_url to Testimonial model
authorYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 21 Aug 2023 11:59:51 +0000 (13:59 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 21 Aug 2023 11:59:51 +0000 (13:59 +0200)
teleforma/models/pro.py

index 36b2eaeed807a470c56908a73b741db60b7a58c9..e935cad0b7858f1c5f9d4515f156a99721c09a8d 100644 (file)
@@ -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: