From b79ff72c90b6f99a867bd44ef1764ae129989bad Mon Sep 17 00:00:00 2001 From: ed woodward Date: Tue, 31 Oct 2023 11:32:22 -0500 Subject: [PATCH] Added amazon iframe field to book --- books/migrations/0150_book_amazon_iframe.py | 18 ++++++++++++++++++ books/models.py | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 books/migrations/0150_book_amazon_iframe.py diff --git a/books/migrations/0150_book_amazon_iframe.py b/books/migrations/0150_book_amazon_iframe.py new file mode 100644 index 000000000..0bcb7cb24 --- /dev/null +++ b/books/migrations/0150_book_amazon_iframe.py @@ -0,0 +1,18 @@ +# Generated by Django 4.1.7 on 2023-10-31 16:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('books', '0149_alter_book_book_state'), + ] + + operations = [ + migrations.AddField( + model_name='book', + name='amazon_iframe', + field=models.TextField(blank=True, help_text='Amazon iframe code block', null=True), + ), + ] diff --git a/books/models.py b/books/models.py index 2b35cddaf..47147c183 100644 --- a/books/models.py +++ b/books/models.py @@ -620,6 +620,7 @@ def get_community_resource_feature_link_url(self): bookshare_link = models.URLField(blank=True, help_text="Link to Bookshare resources") amazon_coming_soon = models.BooleanField(default=False, verbose_name="Individual Print Coming Soon") amazon_link = models.URLField(blank=True, verbose_name="Individual Print Link") + amazon_iframe = models.TextField(blank=True, null=True, help_text='Amazon iframe code block') kindle_link = models.URLField(blank=True, help_text="Link to Kindle version") chegg_link = models.URLField(blank=True, null=True, help_text="Link to Chegg e-reader") chegg_link_text = models.CharField(max_length=255, blank=True, null=True, help_text='Text for Chegg link.') @@ -713,6 +714,7 @@ def get_community_resource_feature_link_url(self): FieldPanel('bookshare_link'), FieldPanel('amazon_coming_soon'), FieldPanel('amazon_link'), + FieldPanel('amazon_iframe'), FieldPanel('kindle_link'), FieldPanel('chegg_link'), FieldPanel('chegg_link_text'), @@ -813,6 +815,7 @@ def get_community_resource_feature_link_url(self): APIField('bookshare_link'), APIField('amazon_coming_soon'), APIField('amazon_link'), + APIField('amazon_iframe'), APIField('kindle_link'), APIField('chegg_link'), APIField('chegg_link_text'),