From 16e355be374d3e3dd43ff95eeaeab1c91b5c2b19 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Tue, 28 Jan 2025 17:48:26 +0000 Subject: [PATCH 01/15] Add `short_title` to all pages --- etna/core/models/basepage.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/etna/core/models/basepage.py b/etna/core/models/basepage.py index a2cb664d6..30cc21e68 100644 --- a/etna/core/models/basepage.py +++ b/etna/core/models/basepage.py @@ -1,6 +1,7 @@ from typing import Any, Dict from django.conf import settings +from django.core.exceptions import ValidationError from django.db import models from django.db.models import options from django.http import HttpRequest @@ -53,6 +54,16 @@ class BasePage(AlertMixin, SocialMixin, DataLayerMixin, HeadlessPreviewMixin, Pa functionality can be added here. """ + short_title = models.CharField( + verbose_name=_("short title"), + help_text=_( + "A shorter title for use in breadcrumbs and other navigational elements, where applicable." + ), + max_length=30, + blank=True, + null=True, + ) + teaser_text = models.TextField( verbose_name=_("teaser text"), help_text=_( @@ -60,6 +71,7 @@ class BasePage(AlertMixin, SocialMixin, DataLayerMixin, HeadlessPreviewMixin, Pa ), max_length=160, ) + teaser_image = models.ForeignKey( get_image_model_string(), null=True, @@ -88,6 +100,7 @@ class BasePage(AlertMixin, SocialMixin, DataLayerMixin, HeadlessPreviewMixin, Pa ], _("For search engines"), ), + FieldPanel("short_title"), ] + SocialMixin.promote_panels settings_panels = Page.settings_panels + AlertMixin.settings_panels @@ -95,6 +108,13 @@ class BasePage(AlertMixin, SocialMixin, DataLayerMixin, HeadlessPreviewMixin, Pa class Meta: abstract = True + def clean(self, *args, **kwargs): + if self.short_title and len(self.short_title) > len(self.title): + raise ValidationError( + {"short_title": ["The short title must not be longer than the title."]} + ) + return super().clean(*args, **kwargs) + @cached_property def type_label(cls) -> str: """ From f159c0d83552b3fbf2041c743b5d55f4d82361c4 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Tue, 28 Jan 2025 17:48:42 +0000 Subject: [PATCH 02/15] Migrations --- ..._title_articlepage_short_title_and_more.py | 33 ++++++++++++++ ...ort_title_blogpage_short_title_and_more.py | 28 ++++++++++++ ..._explorerindexpage_short_title_and_more.py | 43 +++++++++++++++++++ ..._cookiedetailspage_short_title_and_more.py | 23 ++++++++++ ...ralpage_short_title_hubpage_short_title.py | 23 ++++++++++ .../migrations/0031_homepage_short_title.py | 18 ++++++++ ...page_short_title_personpage_short_title.py | 23 ++++++++++ ...age_short_title_whatsonpage_short_title.py | 23 ++++++++++ 8 files changed, 214 insertions(+) create mode 100644 etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py create mode 100644 etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py create mode 100644 etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py create mode 100644 etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py create mode 100644 etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py create mode 100644 etna/home/migrations/0031_homepage_short_title.py create mode 100644 etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py create mode 100644 etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title.py diff --git a/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py b/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py new file mode 100644 index 000000000..05fba0dd4 --- /dev/null +++ b/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py @@ -0,0 +1,33 @@ +# Generated by Django 5.1.5 on 2025-01-28 17:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('articles', '0115_alter_articlepage_body_alter_focusedarticlepage_body'), + ] + + operations = [ + migrations.AddField( + model_name='articleindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='articlepage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='focusedarticlepage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='recordarticlepage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py b/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py new file mode 100644 index 000000000..2df433c9b --- /dev/null +++ b/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.1.5 on 2025-01-28 17:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0010_alter_blogpostpage_body'), + ] + + operations = [ + migrations.AddField( + model_name='blogindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='blogpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='blogpostpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py b/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py new file mode 100644 index 000000000..faac24de4 --- /dev/null +++ b/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py @@ -0,0 +1,43 @@ +# Generated by Django 5.1.5 on 2025-01-28 17:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('collections', '0060_remove_explorerindexpage_uuid_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='explorerindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='highlightgallerypage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='timeperiodexplorerindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='timeperiodexplorerpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='topicexplorerindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='topicexplorerpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py b/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py new file mode 100644 index 000000000..736a99cd7 --- /dev/null +++ b/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.5 on 2025-01-28 17:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cookies', '0002_remove_cookiedetailspage_uuid_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='cookiedetailspage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='cookiespage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py b/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py new file mode 100644 index 000000000..f113501ff --- /dev/null +++ b/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.5 on 2025-01-28 17:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('generic_pages', '0041_alter_generalpage_body'), + ] + + operations = [ + migrations.AddField( + model_name='generalpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='hubpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/home/migrations/0031_homepage_short_title.py b/etna/home/migrations/0031_homepage_short_title.py new file mode 100644 index 000000000..58485811e --- /dev/null +++ b/etna/home/migrations/0031_homepage_short_title.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.5 on 2025-01-28 17:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('home', '0030_remove_homepage_uuid'), + ] + + operations = [ + migrations.AddField( + model_name='homepage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py b/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py new file mode 100644 index 000000000..82b934d6d --- /dev/null +++ b/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.5 on 2025-01-28 17:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('people', '0014_externalauthortag'), + ] + + operations = [ + migrations.AddField( + model_name='peopleindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='personpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title.py b/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title.py new file mode 100644 index 000000000..bbafa1531 --- /dev/null +++ b/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.5 on 2025-01-28 17:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('whatson', '0017_remove_exhibitionpage_location_link_text_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='exhibitionpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='whatsonpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] From 517d7199eaab70c47013c05e122d5f976959266e Mon Sep 17 00:00:00 2001 From: James Biggs Date: Tue, 28 Jan 2025 17:49:03 +0000 Subject: [PATCH 03/15] Update current front-end to use short_title (defaults to title) --- templates/components/breadcrumb.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/components/breadcrumb.html b/templates/components/breadcrumb.html index feb13e56a..a7a2ab222 100644 --- a/templates/components/breadcrumb.html +++ b/templates/components/breadcrumb.html @@ -9,8 +9,8 @@ {% for p in self.get_ancestors %} {% if p.depth > 2 %}
  • - - {{ p.title }} + + {{ p.specific.short_title|default:p.title }}
  • {% endif %} From 983152e254922354949115ebd88c69862bf8e0a0 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Tue, 28 Jan 2025 17:51:34 +0000 Subject: [PATCH 04/15] Add `short_title` to relevant areas of the API --- etna/core/models/basepage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etna/core/models/basepage.py b/etna/core/models/basepage.py index 30cc21e68..f3cc38fe3 100644 --- a/etna/core/models/basepage.py +++ b/etna/core/models/basepage.py @@ -161,6 +161,7 @@ def mourning_notice(self): default_api_fields = [ APIField("id"), APIField("title"), + APIField("short_title"), APIField("url"), APIField("full_url"), APIField("type_label"), @@ -178,6 +179,7 @@ def mourning_notice(self): ] api_meta_fields = [ + APIField("short_title"), APIField("teaser_text"), APIField( "teaser_image", From 37549e3508b60b943a5b73add4d539b1bb01f1e3 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Wed, 29 Jan 2025 14:12:07 +0000 Subject: [PATCH 05/15] Remove short_title from EventPage --- etna/whatson/forms.py | 1 - etna/whatson/models.py | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/etna/whatson/forms.py b/etna/whatson/forms.py index ef5b25637..292c20410 100644 --- a/etna/whatson/forms.py +++ b/etna/whatson/forms.py @@ -14,5 +14,4 @@ def __init__(self, *args, **kwargs): self.fields["lead_image"].required = True self.fields["event_type"].required = True self.fields["venue_type"].required = True - self.fields["short_title"].required = True self.fields["event_type"].required = True diff --git a/etna/whatson/models.py b/etna/whatson/models.py index 764beb6da..e574531a6 100644 --- a/etna/whatson/models.py +++ b/etna/whatson/models.py @@ -504,16 +504,6 @@ class EventPage(ArticleTagMixin, TopicalPageMixin, BasePageWithRequiredIntro): features=settings.RESTRICTED_RICH_TEXT_FEATURES, ) - # Promote tab - short_title = models.CharField( - max_length=50, - verbose_name=_("short title"), - blank=True, - help_text=_( - "A short title for the event. This will be used in the event listings." - ), - ) - # DataLayerMixin overrides gtm_content_group = "What's On" @@ -729,9 +719,6 @@ def save(self, *args, **kwargs): promote_panels = ( BasePageWithRequiredIntro.promote_panels - + [ - FieldPanel("short_title"), - ] + ArticleTagMixin.promote_panels + [ TopicalPageMixin.get_topics_inlinepanel(), From 495fb373744872e57e50935e4e9c9f42af82bfee Mon Sep 17 00:00:00 2001 From: James Biggs Date: Wed, 29 Jan 2025 15:06:14 +0000 Subject: [PATCH 06/15] Remade migrations --- ...expage_short_title_articlepage_short_title_and_more.py | 2 +- ...indexpage_short_title_blogpage_short_title_and_more.py | 2 +- .../0061_explorerindexpage_short_title_and_more.py | 2 +- .../0003_cookiedetailspage_short_title_and_more.py | 2 +- .../0042_generalpage_short_title_hubpage_short_title.py | 2 +- etna/home/migrations/0031_homepage_short_title.py | 2 +- ..._peopleindexpage_short_title_personpage_short_title.py | 2 +- ...npage_short_title_whatsonpage_short_title_and_more.py} | 8 +++++++- 8 files changed, 14 insertions(+), 8 deletions(-) rename etna/whatson/migrations/{0018_exhibitionpage_short_title_whatsonpage_short_title.py => 0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py} (68%) diff --git a/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py b/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py index 05fba0dd4..df81a3411 100644 --- a/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py +++ b/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.5 on 2025-01-28 17:12 +# Generated by Django 5.1.5 on 2025-01-29 14:51 from django.db import migrations, models diff --git a/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py b/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py index 2df433c9b..17419e1d9 100644 --- a/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py +++ b/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.5 on 2025-01-28 17:12 +# Generated by Django 5.1.5 on 2025-01-29 14:51 from django.db import migrations, models diff --git a/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py b/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py index faac24de4..9b3e83522 100644 --- a/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py +++ b/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.5 on 2025-01-28 17:12 +# Generated by Django 5.1.5 on 2025-01-29 14:51 from django.db import migrations, models diff --git a/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py b/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py index 736a99cd7..9c4bfe18c 100644 --- a/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py +++ b/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.5 on 2025-01-28 17:12 +# Generated by Django 5.1.5 on 2025-01-29 14:51 from django.db import migrations, models diff --git a/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py b/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py index f113501ff..efe09b2c8 100644 --- a/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py +++ b/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.5 on 2025-01-28 17:12 +# Generated by Django 5.1.5 on 2025-01-29 14:51 from django.db import migrations, models diff --git a/etna/home/migrations/0031_homepage_short_title.py b/etna/home/migrations/0031_homepage_short_title.py index 58485811e..26d94832a 100644 --- a/etna/home/migrations/0031_homepage_short_title.py +++ b/etna/home/migrations/0031_homepage_short_title.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.5 on 2025-01-28 17:12 +# Generated by Django 5.1.5 on 2025-01-29 14:51 from django.db import migrations, models diff --git a/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py b/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py index 82b934d6d..5c0b5f9d0 100644 --- a/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py +++ b/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.5 on 2025-01-28 17:12 +# Generated by Django 5.1.5 on 2025-01-29 14:51 from django.db import migrations, models diff --git a/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title.py b/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py similarity index 68% rename from etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title.py rename to etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py index bbafa1531..e02e4a6da 100644 --- a/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title.py +++ b/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py @@ -1,4 +1,5 @@ -# Generated by Django 5.1.5 on 2025-01-28 17:12 +# Generated by Django 5.1.5 on 2025-01-29 14:51 +# etna:allowAlterField from django.db import migrations, models @@ -20,4 +21,9 @@ class Migration(migrations.Migration): name='short_title', field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), ), + migrations.AlterField( + model_name='eventpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), ] From 1e62804f90963f6bed3f67675098b217fac06e4c Mon Sep 17 00:00:00 2001 From: James Biggs Date: Wed, 29 Jan 2025 15:23:29 +0000 Subject: [PATCH 07/15] Updated test fixtures --- etna/api/tests/expected_results/article.json | 5 +++++ etna/api/tests/expected_results/article_index.json | 4 ++++ etna/api/tests/expected_results/arts.json | 4 ++++ etna/api/tests/expected_results/author.json | 2 ++ etna/api/tests/expected_results/early_modern.json | 4 ++++ etna/api/tests/expected_results/focused_article.json | 5 +++++ etna/api/tests/expected_results/highlight_gallery.json | 4 ++++ etna/api/tests/expected_results/pages.json | 10 ++++++++++ etna/api/tests/expected_results/people.json | 2 ++ etna/api/tests/expected_results/postwar.json | 2 ++ 10 files changed, 42 insertions(+) diff --git a/etna/api/tests/expected_results/article.json b/etna/api/tests/expected_results/article.json index 27524d42b..ded601ff8 100644 --- a/etna/api/tests/expected_results/article.json +++ b/etna/api/tests/expected_results/article.json @@ -23,6 +23,7 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/article_index/article/", "depth": 4, + "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 12, @@ -317,6 +318,7 @@ { "id": FOCUSED_ID, "title": "focused_article", + "short_title": null, "url": "/article_index/focused_article/", "full_url": "http://localhost/article_index/focused_article/", "type_label": "Focus on", @@ -346,6 +348,7 @@ { "id": ARTS_ID, "title": "arts", + "short_title": null, "url": "/arts/", "full_url": "http://localhost/arts/", "type_label": "Explore the collection", @@ -373,6 +376,7 @@ { "id": EARLY_MODERN_ID, "title": "early_modern", + "short_title": null, "url": "/early_modern/", "full_url": "http://localhost/early_modern/", "type_label": "Explore the collection", @@ -398,6 +402,7 @@ { "id": POSTWAR_ID, "title": "postwar", + "short_title": null, "url": "/postwar/", "full_url": "http://localhost/postwar/", "type_label": "Explore the collection", diff --git a/etna/api/tests/expected_results/article_index.json b/etna/api/tests/expected_results/article_index.json index 6fe6740f9..ad18f9e3c 100644 --- a/etna/api/tests/expected_results/article_index.json +++ b/etna/api/tests/expected_results/article_index.json @@ -23,6 +23,7 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/article_index/", "depth": 3, + "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 11, @@ -72,6 +73,7 @@ "featured_article": { "id": ARTICLE_ID, "title": "article", + "short_title": null, "url": "/article_index/article/", "full_url": "http://localhost/article_index/article/", "type_label": "The story of", @@ -105,6 +107,7 @@ { "id": ARTICLE_ID, "title": "article", + "short_title": null, "url": "/article_index/article/", "full_url": "http://localhost/article_index/article/", "type_label": "The story of", @@ -131,6 +134,7 @@ { "id": FOCUSED_ID, "title": "focused_article", + "short_title": null, "url": "/article_index/focused_article/", "full_url": "http://localhost/article_index/focused_article/", "type_label": "Focus on", diff --git a/etna/api/tests/expected_results/arts.json b/etna/api/tests/expected_results/arts.json index 0efb9c209..ff6b7a126 100644 --- a/etna/api/tests/expected_results/arts.json +++ b/etna/api/tests/expected_results/arts.json @@ -23,6 +23,7 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/arts/", "depth": 3, + "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 2, @@ -119,6 +120,7 @@ { "id": FOCUSED_ID, "title": "focused_article", + "short_title": null, "url": "/article_index/focused_article/", "full_url": "http://localhost/article_index/focused_article/", "type_label": "Focus on", @@ -145,6 +147,7 @@ { "id": ARTICLE_ID, "title": "article", + "short_title": null, "url": "/article_index/article/", "full_url": "http://localhost/article_index/article/", "type_label": "The story of", @@ -173,6 +176,7 @@ { "id": HIGHLIGHT_GALLERY_ID, "title": "highlight_gallery", + "short_title": null, "url": "/arts/highlight_gallery/", "full_url": "http://localhost/arts/highlight_gallery/", "type_label": "In pictures", diff --git a/etna/api/tests/expected_results/author.json b/etna/api/tests/expected_results/author.json index b2ce93b7a..c84f5b913 100644 --- a/etna/api/tests/expected_results/author.json +++ b/etna/api/tests/expected_results/author.json @@ -23,6 +23,7 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/people/author/", "depth": 4, + "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 10, @@ -121,6 +122,7 @@ { "id": FOCUSED_ID, "title": "focused_article", + "short_title": null, "url": "/article_index/focused_article/", "full_url": "http://localhost/article_index/focused_article/", "type_label": "Focus on", diff --git a/etna/api/tests/expected_results/early_modern.json b/etna/api/tests/expected_results/early_modern.json index 38338900e..022c61306 100644 --- a/etna/api/tests/expected_results/early_modern.json +++ b/etna/api/tests/expected_results/early_modern.json @@ -23,6 +23,7 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/early_modern/", "depth": 3, + "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 4, @@ -118,6 +119,7 @@ { "id": FOCUSED_ID, "title": "focused_article", + "short_title": null, "url": "/article_index/focused_article/", "full_url": "http://localhost/article_index/focused_article/", "type_label": "Focus on", @@ -144,6 +146,7 @@ { "id": ARTICLE_ID, "title": "article", + "short_title": null, "url": "/article_index/article/", "full_url": "http://localhost/article_index/article/", "type_label": "The story of", @@ -172,6 +175,7 @@ { "id": HIGHLIGHT_GALLERY_ID, "title": "highlight_gallery", + "short_title": null, "url": "/arts/highlight_gallery/", "full_url": "http://localhost/arts/highlight_gallery/", "type_label": "In pictures", diff --git a/etna/api/tests/expected_results/focused_article.json b/etna/api/tests/expected_results/focused_article.json index 6b52acfbe..5047ff39b 100644 --- a/etna/api/tests/expected_results/focused_article.json +++ b/etna/api/tests/expected_results/focused_article.json @@ -23,6 +23,7 @@ "last_published_at": "2000-01-02T00:00:00Z", "url": "/article_index/focused_article/", "depth": 4, + "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 14, @@ -130,6 +131,7 @@ { "id": ARTICLE_ID, "title": "article", + "short_title": null, "url": "/article_index/article/", "full_url": "http://localhost/article_index/article/", "type_label": "The story of", @@ -159,6 +161,7 @@ { "id": ARTS_ID, "title": "arts", + "short_title": null, "url": "/arts/", "full_url": "http://localhost/arts/", "type_label": "Explore the collection", @@ -186,6 +189,7 @@ { "id": EARLY_MODERN_ID, "title": "early_modern", + "short_title": null, "url": "/early_modern/", "full_url": "http://localhost/early_modern/", "type_label": "Explore the collection", @@ -213,6 +217,7 @@ { "id": AUTHOR_ID, "title": "author", + "short_title": null, "url": "/people/author/", "full_url": "http://localhost/people/author/", "type_label": null, diff --git a/etna/api/tests/expected_results/highlight_gallery.json b/etna/api/tests/expected_results/highlight_gallery.json index 4d26ea61d..30ae665d8 100644 --- a/etna/api/tests/expected_results/highlight_gallery.json +++ b/etna/api/tests/expected_results/highlight_gallery.json @@ -23,6 +23,7 @@ "last_published_at": "2000-01-03T00:00:00Z", "url": "/arts/highlight_gallery/", "depth": 4, + "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 16, @@ -74,6 +75,7 @@ "featured_article": { "id": ARTICLE_ID, "title": "article", + "short_title": null, "url": "/article_index/article/", "full_url": "http://localhost/article_index/article/", "type_label": "The story of", @@ -157,6 +159,7 @@ { "id": ARTS_ID, "title": "arts", + "short_title": null, "url": "/arts/", "full_url": "http://localhost/arts/", "type_label": "Explore the collection", @@ -184,6 +187,7 @@ { "id": EARLY_MODERN_ID, "title": "early_modern", + "short_title": null, "url": "/early_modern/", "full_url": "http://localhost/early_modern/", "type_label": "Explore the collection", diff --git a/etna/api/tests/expected_results/pages.json b/etna/api/tests/expected_results/pages.json index ad579aba5..3fa322fa5 100644 --- a/etna/api/tests/expected_results/pages.json +++ b/etna/api/tests/expected_results/pages.json @@ -6,6 +6,7 @@ { "id": HOME_PAGE_ID, "title": "Home", + "short_title": null, "url": "/", "full_url": "http://localhost/", "type_label": null, @@ -16,6 +17,7 @@ { "id": ARTS_ID, "title": "arts", + "short_title": null, "url": "/arts/", "full_url": "http://localhost/arts/", "type_label": "Explore the collection", @@ -41,6 +43,7 @@ { "id": HIGHLIGHT_GALLERY_ID, "title": "highlight_gallery", + "short_title": null, "url": "/arts/highlight_gallery/", "full_url": "http://localhost/arts/highlight_gallery/", "type_label": "In pictures", @@ -67,6 +70,7 @@ { "id": EARLY_MODERN_ID, "title": "early_modern", + "short_title": null, "url": "/early_modern/", "full_url": "http://localhost/early_modern/", "type_label": "Explore the collection", @@ -92,6 +96,7 @@ { "id": POSTWAR_ID, "title": "postwar", + "short_title": null, "url": "/postwar/", "full_url": "http://localhost/postwar/", "type_label": "Explore the collection", @@ -117,6 +122,7 @@ { "id": AUTHOR_INDEX_ID, "title": "people", + "short_title": null, "url": "/people/", "full_url": "http://localhost/people/", "type_label": null, @@ -142,6 +148,7 @@ { "id": AUTHOR_ID, "title": "author", + "short_title": null, "url": "/people/author/", "full_url": "http://localhost/people/author/", "type_label": null, @@ -209,6 +216,7 @@ { "id": ARTICLE_INDEX_ID, "title": "article_index", + "short_title": null, "url": "/article_index/", "full_url": "http://localhost/article_index/", "type_label": null, @@ -234,6 +242,7 @@ { "id": ARTICLE_ID, "title": "article", + "short_title": null, "url": "/article_index/article/", "full_url": "http://localhost/article_index/article/", "type_label": "The story of", @@ -260,6 +269,7 @@ { "id": FOCUSED_ID, "title": "focused_article", + "short_title": null, "url": "/article_index/focused_article/", "full_url": "http://localhost/article_index/focused_article/", "type_label": "Focus on", diff --git a/etna/api/tests/expected_results/people.json b/etna/api/tests/expected_results/people.json index 5d32caab2..a2006a126 100644 --- a/etna/api/tests/expected_results/people.json +++ b/etna/api/tests/expected_results/people.json @@ -23,6 +23,7 @@ "last_published_at": null, "url": "/people/", "depth": 3, + "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 8, @@ -78,6 +79,7 @@ { "id": AUTHOR_ID, "title": "author", + "short_title": null, "url": "/people/author/", "full_url": "http://localhost/people/author/", "type_label": null, diff --git a/etna/api/tests/expected_results/postwar.json b/etna/api/tests/expected_results/postwar.json index 12de075d8..7b3048a0e 100644 --- a/etna/api/tests/expected_results/postwar.json +++ b/etna/api/tests/expected_results/postwar.json @@ -23,6 +23,7 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/postwar/", "depth": 3, + "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 6, @@ -118,6 +119,7 @@ { "id": ARTICLE_ID, "title": "article", + "short_title": null, "url": "/article_index/article/", "full_url": "http://localhost/article_index/article/", "type_label": "The story of", From 59c20cfd22915062de4e7aa90b525e965dc76d90 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Wed, 29 Jan 2025 16:09:34 +0000 Subject: [PATCH 08/15] Delete migrations --- ..._title_articlepage_short_title_and_more.py | 33 -------------- ...ort_title_blogpage_short_title_and_more.py | 28 ------------ ..._explorerindexpage_short_title_and_more.py | 43 ------------------- ..._cookiedetailspage_short_title_and_more.py | 23 ---------- ...ralpage_short_title_hubpage_short_title.py | 23 ---------- .../migrations/0031_homepage_short_title.py | 18 -------- ...page_short_title_personpage_short_title.py | 23 ---------- ..._title_whatsonpage_short_title_and_more.py | 29 ------------- 8 files changed, 220 deletions(-) delete mode 100644 etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py delete mode 100644 etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py delete mode 100644 etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py delete mode 100644 etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py delete mode 100644 etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py delete mode 100644 etna/home/migrations/0031_homepage_short_title.py delete mode 100644 etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py delete mode 100644 etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py diff --git a/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py b/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py deleted file mode 100644 index df81a3411..000000000 --- a/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 5.1.5 on 2025-01-29 14:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('articles', '0115_alter_articlepage_body_alter_focusedarticlepage_body'), - ] - - operations = [ - migrations.AddField( - model_name='articleindexpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='articlepage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='focusedarticlepage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='recordarticlepage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - ] diff --git a/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py b/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py deleted file mode 100644 index 17419e1d9..000000000 --- a/etna/blog/migrations/0011_blogindexpage_short_title_blogpage_short_title_and_more.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 5.1.5 on 2025-01-29 14:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('blog', '0010_alter_blogpostpage_body'), - ] - - operations = [ - migrations.AddField( - model_name='blogindexpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='blogpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='blogpostpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - ] diff --git a/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py b/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py deleted file mode 100644 index 9b3e83522..000000000 --- a/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py +++ /dev/null @@ -1,43 +0,0 @@ -# Generated by Django 5.1.5 on 2025-01-29 14:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('collections', '0060_remove_explorerindexpage_uuid_and_more'), - ] - - operations = [ - migrations.AddField( - model_name='explorerindexpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='highlightgallerypage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='timeperiodexplorerindexpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='timeperiodexplorerpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='topicexplorerindexpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='topicexplorerpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - ] diff --git a/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py b/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py deleted file mode 100644 index 9c4bfe18c..000000000 --- a/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 5.1.5 on 2025-01-29 14:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('cookies', '0002_remove_cookiedetailspage_uuid_and_more'), - ] - - operations = [ - migrations.AddField( - model_name='cookiedetailspage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='cookiespage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - ] diff --git a/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py b/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py deleted file mode 100644 index efe09b2c8..000000000 --- a/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 5.1.5 on 2025-01-29 14:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('generic_pages', '0041_alter_generalpage_body'), - ] - - operations = [ - migrations.AddField( - model_name='generalpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='hubpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - ] diff --git a/etna/home/migrations/0031_homepage_short_title.py b/etna/home/migrations/0031_homepage_short_title.py deleted file mode 100644 index 26d94832a..000000000 --- a/etna/home/migrations/0031_homepage_short_title.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 5.1.5 on 2025-01-29 14:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('home', '0030_remove_homepage_uuid'), - ] - - operations = [ - migrations.AddField( - model_name='homepage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - ] diff --git a/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py b/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py deleted file mode 100644 index 5c0b5f9d0..000000000 --- a/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 5.1.5 on 2025-01-29 14:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('people', '0014_externalauthortag'), - ] - - operations = [ - migrations.AddField( - model_name='peopleindexpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='personpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - ] diff --git a/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py b/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py deleted file mode 100644 index e02e4a6da..000000000 --- a/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 5.1.5 on 2025-01-29 14:51 -# etna:allowAlterField - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('whatson', '0017_remove_exhibitionpage_location_link_text_and_more'), - ] - - operations = [ - migrations.AddField( - model_name='exhibitionpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AddField( - model_name='whatsonpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - migrations.AlterField( - model_name='eventpage', - name='short_title', - field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), - ), - ] From 36da2b49d22a0cb3edb8753e4b0771562c2cd115 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Wed, 29 Jan 2025 16:17:33 +0000 Subject: [PATCH 09/15] Remake migrations --- ..._title_articlepage_short_title_and_more.py | 33 ++++++++++++++ ...ort_title_blogpage_short_title_and_more.py | 28 ++++++++++++ ..._explorerindexpage_short_title_and_more.py | 43 +++++++++++++++++++ ..._cookiedetailspage_short_title_and_more.py | 23 ++++++++++ ...ralpage_short_title_hubpage_short_title.py | 23 ++++++++++ .../migrations/0031_homepage_short_title.py | 18 ++++++++ ...page_short_title_personpage_short_title.py | 23 ++++++++++ ..._title_whatsonpage_short_title_and_more.py | 29 +++++++++++++ 8 files changed, 220 insertions(+) create mode 100644 etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py create mode 100644 etna/blog/migrations/0012_blogindexpage_short_title_blogpage_short_title_and_more.py create mode 100644 etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py create mode 100644 etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py create mode 100644 etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py create mode 100644 etna/home/migrations/0031_homepage_short_title.py create mode 100644 etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py create mode 100644 etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py diff --git a/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py b/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py new file mode 100644 index 000000000..6d7a676db --- /dev/null +++ b/etna/articles/migrations/0116_articleindexpage_short_title_articlepage_short_title_and_more.py @@ -0,0 +1,33 @@ +# Generated by Django 5.1.5 on 2025-01-29 16:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('articles', '0115_alter_articlepage_body_alter_focusedarticlepage_body'), + ] + + operations = [ + migrations.AddField( + model_name='articleindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='articlepage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='focusedarticlepage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='recordarticlepage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/blog/migrations/0012_blogindexpage_short_title_blogpage_short_title_and_more.py b/etna/blog/migrations/0012_blogindexpage_short_title_blogpage_short_title_and_more.py new file mode 100644 index 000000000..cc6956bed --- /dev/null +++ b/etna/blog/migrations/0012_blogindexpage_short_title_blogpage_short_title_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.1.5 on 2025-01-29 16:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0011_blogpage_custom_type_label'), + ] + + operations = [ + migrations.AddField( + model_name='blogindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='blogpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='blogpostpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py b/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py new file mode 100644 index 000000000..5fd501e03 --- /dev/null +++ b/etna/collections/migrations/0061_explorerindexpage_short_title_and_more.py @@ -0,0 +1,43 @@ +# Generated by Django 5.1.5 on 2025-01-29 16:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('collections', '0060_remove_explorerindexpage_uuid_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='explorerindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='highlightgallerypage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='timeperiodexplorerindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='timeperiodexplorerpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='topicexplorerindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='topicexplorerpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py b/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py new file mode 100644 index 000000000..72050275d --- /dev/null +++ b/etna/cookies/migrations/0003_cookiedetailspage_short_title_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.5 on 2025-01-29 16:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cookies', '0002_remove_cookiedetailspage_uuid_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='cookiedetailspage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='cookiespage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py b/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py new file mode 100644 index 000000000..c18f6e357 --- /dev/null +++ b/etna/generic_pages/migrations/0042_generalpage_short_title_hubpage_short_title.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.5 on 2025-01-29 16:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('generic_pages', '0041_alter_generalpage_body'), + ] + + operations = [ + migrations.AddField( + model_name='generalpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='hubpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/home/migrations/0031_homepage_short_title.py b/etna/home/migrations/0031_homepage_short_title.py new file mode 100644 index 000000000..e9f357182 --- /dev/null +++ b/etna/home/migrations/0031_homepage_short_title.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.5 on 2025-01-29 16:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('home', '0030_remove_homepage_uuid'), + ] + + operations = [ + migrations.AddField( + model_name='homepage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py b/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py new file mode 100644 index 000000000..be2c82cc1 --- /dev/null +++ b/etna/people/migrations/0015_peopleindexpage_short_title_personpage_short_title.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.5 on 2025-01-29 16:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('people', '0014_externalauthortag'), + ] + + operations = [ + migrations.AddField( + model_name='peopleindexpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='personpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] diff --git a/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py b/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py new file mode 100644 index 000000000..f119c9a74 --- /dev/null +++ b/etna/whatson/migrations/0018_exhibitionpage_short_title_whatsonpage_short_title_and_more.py @@ -0,0 +1,29 @@ +# Generated by Django 5.1.5 on 2025-01-29 16:14 +# etna:allowAlterField + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('whatson', '0017_remove_exhibitionpage_location_link_text_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='exhibitionpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AddField( + model_name='whatsonpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + migrations.AlterField( + model_name='eventpage', + name='short_title', + field=models.CharField(blank=True, help_text='A shorter title for use in breadcrumbs and other navigational elements, where applicable.', max_length=30, null=True, verbose_name='short title'), + ), + ] From 7de04a9f91d04a594f8119262d275eff8945c754 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Thu, 30 Jan 2025 13:27:13 +0000 Subject: [PATCH 10/15] Wait for application Docker container to be healthy before running migrations when pulling data --- dev/pull-data | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/pull-data b/dev/pull-data index 61b5aa8ef..2cefea5d2 100755 --- a/dev/pull-data +++ b/dev/pull-data @@ -38,6 +38,9 @@ rm "$DB_DUMP_DIR/$DB_DUMP" echo "Starting the app container..." docker compose -p ds-wagtail restart app +echo "Wait for application container to be healthy..." +for c in {1..30}; do sleep 1 && curl -s -w '%{http_code}' -o /dev/null http://host.docker.internal:8000/healthcheck/live/ | grep -o "200" && break; done + echo "Running migrations..." docker compose -p ds-wagtail exec app poetry run python manage.py migrate From ada5f342bc664e0c546b9db37db9b1bdb6e81120 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Thu, 30 Jan 2025 13:31:14 +0000 Subject: [PATCH 11/15] Don't run migrations on pull --- dev/pull-data | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/pull-data b/dev/pull-data index 2cefea5d2..2e98e6494 100755 --- a/dev/pull-data +++ b/dev/pull-data @@ -38,11 +38,11 @@ rm "$DB_DUMP_DIR/$DB_DUMP" echo "Starting the app container..." docker compose -p ds-wagtail restart app -echo "Wait for application container to be healthy..." -for c in {1..30}; do sleep 1 && curl -s -w '%{http_code}' -o /dev/null http://host.docker.internal:8000/healthcheck/live/ | grep -o "200" && break; done +# echo "Wait for application container to be healthy..." +# for c in {1..30}; do sleep 1 && curl -s -w '%{http_code}' -o /dev/null http://host.docker.internal:8000/healthcheck/live/ | grep -o "200" && break; done -echo "Running migrations..." -docker compose -p ds-wagtail exec app poetry run python manage.py migrate +# echo "Running migrations..." +# docker compose -p ds-wagtail exec app poetry run python manage.py migrate echo "Running birdbath..." docker compose -p ds-wagtail exec app poetry run python manage.py run_birdbath From bef6610504ff26c0e8b1cf799e4e5eb0312424a2 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Thu, 30 Jan 2025 13:55:58 +0000 Subject: [PATCH 12/15] Move `short_title` to `api_fields` --- etna/core/models/basepage.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/etna/core/models/basepage.py b/etna/core/models/basepage.py index f3cc38fe3..367868042 100644 --- a/etna/core/models/basepage.py +++ b/etna/core/models/basepage.py @@ -173,13 +173,16 @@ def mourning_notice(self): APIField("last_published_at"), ] - api_fields = AlertMixin.api_fields + [ - APIField("type_label"), - APIField("mourning_notice", serializer=MourningSerializer()), - ] + api_fields = ( + [APIField("short_title")] + + AlertMixin.api_fields + + [ + APIField("type_label"), + APIField("mourning_notice", serializer=MourningSerializer()), + ] + ) api_meta_fields = [ - APIField("short_title"), APIField("teaser_text"), APIField( "teaser_image", From 83157e1896e2f6abf339b0357c6247921a9bdbb5 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Thu, 30 Jan 2025 14:00:17 +0000 Subject: [PATCH 13/15] Updated test fixtures --- etna/api/tests/expected_results/article.json | 2 +- etna/api/tests/expected_results/article_index.json | 2 +- etna/api/tests/expected_results/arts.json | 2 +- etna/api/tests/expected_results/author.json | 2 +- etna/api/tests/expected_results/early_modern.json | 2 +- etna/api/tests/expected_results/focused_article.json | 2 +- etna/api/tests/expected_results/highlight_gallery.json | 2 +- etna/api/tests/expected_results/people.json | 2 +- etna/api/tests/expected_results/postwar.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/etna/api/tests/expected_results/article.json b/etna/api/tests/expected_results/article.json index ded601ff8..00da7f19d 100644 --- a/etna/api/tests/expected_results/article.json +++ b/etna/api/tests/expected_results/article.json @@ -23,7 +23,6 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/article_index/article/", "depth": 4, - "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 12, @@ -63,6 +62,7 @@ "twitter_og_image": null }, "title": "article", + "short_title": null, "global_alert": null, "type_label": "The story of", "mourning_notice": { diff --git a/etna/api/tests/expected_results/article_index.json b/etna/api/tests/expected_results/article_index.json index ad18f9e3c..ca268f2be 100644 --- a/etna/api/tests/expected_results/article_index.json +++ b/etna/api/tests/expected_results/article_index.json @@ -23,7 +23,6 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/article_index/", "depth": 3, - "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 11, @@ -63,6 +62,7 @@ "twitter_og_image": null }, "title": "article_index", + "short_title": null, "global_alert": null, "type_label": null, "mourning_notice": { diff --git a/etna/api/tests/expected_results/arts.json b/etna/api/tests/expected_results/arts.json index ff6b7a126..e87de6a2d 100644 --- a/etna/api/tests/expected_results/arts.json +++ b/etna/api/tests/expected_results/arts.json @@ -23,7 +23,6 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/arts/", "depth": 3, - "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 2, @@ -63,6 +62,7 @@ "twitter_og_image": null }, "title": "arts", + "short_title": null, "hero_image_caption": "

    Hero image caption

    ", "hero_image": { "id": 3, diff --git a/etna/api/tests/expected_results/author.json b/etna/api/tests/expected_results/author.json index af9aaddd2..46ce652b7 100644 --- a/etna/api/tests/expected_results/author.json +++ b/etna/api/tests/expected_results/author.json @@ -23,7 +23,6 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/people/author/", "depth": 4, - "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 10, @@ -63,6 +62,7 @@ "twitter_og_image": null }, "title": "author", + "short_title": null, "global_alert": { "title": "BETA", "message": "

    Message

    ", diff --git a/etna/api/tests/expected_results/early_modern.json b/etna/api/tests/expected_results/early_modern.json index 022c61306..84bb85cd9 100644 --- a/etna/api/tests/expected_results/early_modern.json +++ b/etna/api/tests/expected_results/early_modern.json @@ -23,7 +23,6 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/early_modern/", "depth": 3, - "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 4, @@ -63,6 +62,7 @@ "twitter_og_image": null }, "title": "early_modern", + "short_title": null, "hero_image_caption": "

    Hero image caption

    ", "hero_image": { "id": 5, diff --git a/etna/api/tests/expected_results/focused_article.json b/etna/api/tests/expected_results/focused_article.json index 5047ff39b..db62b042a 100644 --- a/etna/api/tests/expected_results/focused_article.json +++ b/etna/api/tests/expected_results/focused_article.json @@ -23,7 +23,6 @@ "last_published_at": "2000-01-02T00:00:00Z", "url": "/article_index/focused_article/", "depth": 4, - "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 14, @@ -63,6 +62,7 @@ "twitter_og_image": null }, "title": "focused_article", + "short_title": null, "global_alert": null, "type_label": "Focus on", "mourning_notice": { diff --git a/etna/api/tests/expected_results/highlight_gallery.json b/etna/api/tests/expected_results/highlight_gallery.json index 30ae665d8..c64e4834d 100644 --- a/etna/api/tests/expected_results/highlight_gallery.json +++ b/etna/api/tests/expected_results/highlight_gallery.json @@ -23,7 +23,6 @@ "last_published_at": "2000-01-03T00:00:00Z", "url": "/arts/highlight_gallery/", "depth": 4, - "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 16, @@ -63,6 +62,7 @@ "twitter_og_image": null }, "title": "highlight_gallery", + "short_title": null, "global_alert": null, "type_label": "In pictures", "mourning_notice": { diff --git a/etna/api/tests/expected_results/people.json b/etna/api/tests/expected_results/people.json index a2006a126..360ea3aea 100644 --- a/etna/api/tests/expected_results/people.json +++ b/etna/api/tests/expected_results/people.json @@ -23,7 +23,6 @@ "last_published_at": null, "url": "/people/", "depth": 3, - "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 8, @@ -63,6 +62,7 @@ "twitter_og_image": null }, "title": "people", + "short_title": null, "global_alert": { "title": "BETA", "message": "

    Message

    ", diff --git a/etna/api/tests/expected_results/postwar.json b/etna/api/tests/expected_results/postwar.json index 7b3048a0e..01323857e 100644 --- a/etna/api/tests/expected_results/postwar.json +++ b/etna/api/tests/expected_results/postwar.json @@ -23,7 +23,6 @@ "last_published_at": "2000-01-01T00:00:00Z", "url": "/postwar/", "depth": 3, - "short_title": null, "teaser_text": "Teaser text", "teaser_image": { "id": 6, @@ -63,6 +62,7 @@ "twitter_og_image": null }, "title": "postwar", + "short_title": null, "hero_image_caption": "

    Hero image caption

    ", "hero_image": { "id": 7, From 11f3d131f4c33078c07382c34442bebb9ea502d1 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Thu, 30 Jan 2025 15:08:41 +0000 Subject: [PATCH 14/15] Switching API ordering --- etna/collections/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etna/collections/models.py b/etna/collections/models.py index 9b9d4ec7a..7d0c1bf74 100644 --- a/etna/collections/models.py +++ b/etna/collections/models.py @@ -297,8 +297,8 @@ class Meta: ] api_fields = ( - RequiredHeroImageMixin.api_fields - + BasePageWithRequiredIntro.api_fields + BasePageWithRequiredIntro.api_fields + + RequiredHeroImageMixin.api_fields + [ APIField("body"), APIField( @@ -514,8 +514,8 @@ class Meta: ) api_fields = ( - RequiredHeroImageMixin.api_fields - + BasePageWithRequiredIntro.api_fields + BasePageWithRequiredIntro.api_fields + + RequiredHeroImageMixin.api_fields + [ APIField("body"), APIField( From 951b9525660e92d4ca5ce466fb5472fe5f19a616 Mon Sep 17 00:00:00 2001 From: James Biggs Date: Thu, 30 Jan 2025 15:24:21 +0000 Subject: [PATCH 15/15] Updated fixtures --- etna/api/tests/expected_results/arts.json | 14 +++++++------- etna/api/tests/expected_results/early_modern.json | 14 +++++++------- etna/api/tests/expected_results/postwar.json | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/etna/api/tests/expected_results/arts.json b/etna/api/tests/expected_results/arts.json index e87de6a2d..bf9d158da 100644 --- a/etna/api/tests/expected_results/arts.json +++ b/etna/api/tests/expected_results/arts.json @@ -63,6 +63,13 @@ }, "title": "arts", "short_title": null, + "global_alert": null, + "type_label": "Explore the collection", + "mourning_notice": { + "title": "Test title", + "message": "

    Test message

    " + }, + "intro": "

    Intro text

    ", "hero_image_caption": "

    Hero image caption

    ", "hero_image": { "id": 3, @@ -106,13 +113,6 @@ "is_sensitive": false, "custom_sensitive_image_warning": null }, - "global_alert": null, - "type_label": "Explore the collection", - "mourning_notice": { - "title": "Test title", - "message": "

    Test message

    " - }, - "intro": "

    Intro text

    ", "body": [], "featured_article": null, "skos_id": "arts", diff --git a/etna/api/tests/expected_results/early_modern.json b/etna/api/tests/expected_results/early_modern.json index 84bb85cd9..85645caf3 100644 --- a/etna/api/tests/expected_results/early_modern.json +++ b/etna/api/tests/expected_results/early_modern.json @@ -63,6 +63,13 @@ }, "title": "early_modern", "short_title": null, + "global_alert": null, + "type_label": "Explore the collection", + "mourning_notice": { + "title": "Test title", + "message": "

    Test message

    " + }, + "intro": "

    Intro text

    ", "hero_image_caption": "

    Hero image caption

    ", "hero_image": { "id": 5, @@ -106,13 +113,6 @@ "is_sensitive": false, "custom_sensitive_image_warning": null }, - "global_alert": null, - "type_label": "Explore the collection", - "mourning_notice": { - "title": "Test title", - "message": "

    Test message

    " - }, - "intro": "

    Intro text

    ", "body": [], "featured_article": null, "related_articles": [ diff --git a/etna/api/tests/expected_results/postwar.json b/etna/api/tests/expected_results/postwar.json index 01323857e..15cb77b23 100644 --- a/etna/api/tests/expected_results/postwar.json +++ b/etna/api/tests/expected_results/postwar.json @@ -63,6 +63,13 @@ }, "title": "postwar", "short_title": null, + "global_alert": null, + "type_label": "Explore the collection", + "mourning_notice": { + "title": "Test title", + "message": "

    Test message

    " + }, + "intro": "

    Intro text

    ", "hero_image_caption": "

    Hero image caption

    ", "hero_image": { "id": 7, @@ -106,13 +113,6 @@ "is_sensitive": false, "custom_sensitive_image_warning": null }, - "global_alert": null, - "type_label": "Explore the collection", - "mourning_notice": { - "title": "Test title", - "message": "

    Test message

    " - }, - "intro": "

    Intro text

    ", "body": [], "featured_article": null, "related_articles": [