- Add published_date field to ArticlePage with auto-populate from first_published_at on first publish, plus data migration backfill - Surface go_live_at/expire_at scheduling fields in editor panels - Reorganise ArticlePage editor with TabbedInterface (Content, Metadata, Publishing, SEO tabs) - Add Articles PageListingViewSet to admin menu with custom columns (author, category, published date, status) and category/author filters - Add Articles summary dashboard panel showing drafts, scheduled, and recently published articles - Update all front-end queries and RSS feeds to use published_date - Add 10 unit tests and 4 E2E tests for new admin features Closes #39 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
25 lines
657 B
Python
25 lines
657 B
Python
# Generated by Django 5.2.11 on 2026-03-03 13:59
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def backfill_published_date(apps, schema_editor):
|
|
schema_editor.execute(
|
|
"UPDATE blog_articlepage SET published_date = p.first_published_at "
|
|
"FROM wagtailcore_page p "
|
|
"WHERE blog_articlepage.page_ptr_id = p.id "
|
|
"AND blog_articlepage.published_date IS NULL "
|
|
"AND p.first_published_at IS NOT NULL"
|
|
)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('blog', '0003_add_published_date'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(backfill_published_date, migrations.RunPython.noop),
|
|
]
|