From 70cc8d9f5d5c0be87863c69fc822139ce0d3db72 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Wed, 17 Mar 2021 12:32:08 -0700 Subject: [PATCH] add license/attribution for ebook to feeds --- audio/models.py | 4 ++-- audio/templates/audio/feeds.html | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/audio/models.py b/audio/models.py index b45d8a1..9953088 100644 --- a/audio/models.py +++ b/audio/models.py @@ -62,11 +62,11 @@ class Feed(UUIDAsIDModel): @property def license_name(self): - return(get_license_info(self.image_license))[0] + return(get_license_info(self.license))[0] @property def license_url(self): - return(get_license_info(self.image_license))[1] + return(get_license_info(self.license))[1] def save(self, *args, **kwargs): if not self.slug: diff --git a/audio/templates/audio/feeds.html b/audio/templates/audio/feeds.html index 52dad79..e0e5dad 100644 --- a/audio/templates/audio/feeds.html +++ b/audio/templates/audio/feeds.html @@ -36,7 +36,19 @@ {{ i.image_attribution }} {% endif %} is licensed {{ i.image_license_name }} - {{ i.image_license_jurisdiction }}.
+ {{ i.image_license_jurisdiction }}. +
+ {{ i.ebook_title }} by + {{ i.author }} + is licensed {{ i.license_name }} + {{ i.license_jurisdiction }}. + {% if i.translator != '' %} + Translated by {{ i.translator }}. + {% endif %} + {% if i.intro_author != '' %} + Intro by {{ i.intro_author }}. + {% endif %} +

{{ i.description }}