Skip to content

Commit

Permalink
archived_blog_url on PersonPage (#1802)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored Mar 5, 2025
1 parent e6a55c4 commit f62857d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion etna/api/tests/expected_results/author.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,6 @@
},
"summary": "<p>Summary text</p>",
"research_summary": [],
"shop_items": []
"shop_items": [],
"archived_blog_url": null
}
18 changes: 18 additions & 0 deletions etna/people/migrations/0017_personpage_archived_blog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.6 on 2025-03-04 15:46

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('people', '0016_alter_personpage_research_summary'),
]

operations = [
migrations.AddField(
model_name='personpage',
name='archived_blog_url',
field=models.URLField(blank=True, help_text="Link to the author's blog on the web archive", null=True),
),
]
8 changes: 8 additions & 0 deletions etna/people/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ class PersonPage(BasePage):

research_summary = StreamField(ResearchSummaryStreamBlock, blank=True, null=True)

archived_blog_url = models.URLField(
blank=True,
null=True,
help_text="Link to the author's blog on the web archive",
)

first_name = models.CharField(
max_length=255,
)
Expand All @@ -129,6 +135,7 @@ class PersonPage(BasePage):
FieldPanel("summary"),
FieldPanel("research_summary"),
InlinePanel("shop_items", label="Shop items"),
FieldPanel("archived_blog_url"),
]

promote_panels = [
Expand Down Expand Up @@ -176,6 +183,7 @@ class Meta:
APIField(
"shop_items",
),
APIField("archived_blog_url"),
]

@cached_property
Expand Down

0 comments on commit f62857d

Please sign in to comment.