Skip to content

Commit

Permalink
Added amazon iframe field to book
Browse files Browse the repository at this point in the history
  • Loading branch information
edwoodward committed Oct 31, 2023
1 parent 3062528 commit b79ff72
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions books/migrations/0150_book_amazon_iframe.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
3 changes: 3 additions & 0 deletions books/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -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'),
Expand Down

0 comments on commit b79ff72

Please sign in to comment.