Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short title #1785

Merged
merged 17 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions dev/pull-data
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ rm "$DB_DUMP_DIR/$DB_DUMP"
echo "Starting the app container..."
docker compose -p ds-wagtail restart app

echo "Running migrations..."
docker compose -p ds-wagtail exec app poetry run python manage.py migrate
# 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 birdbath..."
docker compose -p ds-wagtail exec app poetry run python manage.py run_birdbath
Expand Down
5 changes: 5 additions & 0 deletions etna/api/tests/expected_results/article.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -346,6 +348,7 @@
{
"id": ARTS_ID,
"title": "arts",
"short_title": null,
"url": "/arts/",
"full_url": "http://localhost/arts/",
"type_label": "Explore the collection",
Expand Down Expand Up @@ -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",
Expand All @@ -398,6 +402,7 @@
{
"id": POSTWAR_ID,
"title": "postwar",
"short_title": null,
"url": "/postwar/",
"full_url": "http://localhost/postwar/",
"type_label": "Explore the collection",
Expand Down
4 changes: 4 additions & 0 deletions etna/api/tests/expected_results/article_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions etna/api/tests/expected_results/arts.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions etna/api/tests/expected_results/author.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions etna/api/tests/expected_results/early_modern.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions etna/api/tests/expected_results/focused_article.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -159,6 +161,7 @@
{
"id": ARTS_ID,
"title": "arts",
"short_title": null,
"url": "/arts/",
"full_url": "http://localhost/arts/",
"type_label": "Explore the collection",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -213,6 +217,7 @@
{
"id": AUTHOR_ID,
"title": "author",
"short_title": null,
"url": "/people/author/",
"full_url": "http://localhost/people/author/",
"type_label": null,
Expand Down
4 changes: 4 additions & 0 deletions etna/api/tests/expected_results/highlight_gallery.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -157,6 +159,7 @@
{
"id": ARTS_ID,
"title": "arts",
"short_title": null,
"url": "/arts/",
"full_url": "http://localhost/arts/",
"type_label": "Explore the collection",
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions etna/api/tests/expected_results/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{
"id": HOME_PAGE_ID,
"title": "Home",
"short_title": null,
"url": "/",
"full_url": "http://localhost/",
"type_label": null,
Expand All @@ -16,6 +17,7 @@
{
"id": ARTS_ID,
"title": "arts",
"short_title": null,
"url": "/arts/",
"full_url": "http://localhost/arts/",
"type_label": "Explore the collection",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -92,6 +96,7 @@
{
"id": POSTWAR_ID,
"title": "postwar",
"short_title": null,
"url": "/postwar/",
"full_url": "http://localhost/postwar/",
"type_label": "Explore the collection",
Expand All @@ -117,6 +122,7 @@
{
"id": AUTHOR_INDEX_ID,
"title": "people",
"short_title": null,
"url": "/people/",
"full_url": "http://localhost/people/",
"type_label": null,
Expand All @@ -142,6 +148,7 @@
{
"id": AUTHOR_ID,
"title": "author",
"short_title": null,
"url": "/people/author/",
"full_url": "http://localhost/people/author/",
"type_label": null,
Expand Down Expand Up @@ -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,
Expand All @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions etna/api/tests/expected_results/people.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"last_published_at": null,
"url": "/people/",
"depth": 3,
"short_title": null,
"teaser_text": "Teaser text",
"teaser_image": {
"id": 8,
Expand Down Expand Up @@ -78,6 +79,7 @@
{
"id": AUTHOR_ID,
"title": "author",
"short_title": null,
"url": "/people/author/",
"full_url": "http://localhost/people/author/",
"type_label": null,
Expand Down
2 changes: 2 additions & 0 deletions etna/api/tests/expected_results/postwar.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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'),
),
]
Loading