Address PR review feedback
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m19s
CI / pr-e2e (pull_request) Failing after 2m13s

- Gate e2e-admin superuser behind E2E_MODE env var (security)
- Add status and tag filters to ArticleFilterSet
- Set default_ordering to -published_date on listing viewset
- Add summary to ArticlePage.search_fields for search support
- Add 4 new tests for filters, ordering, and search fields

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Mark
2026-03-03 20:37:58 +00:00
parent d387bf4f03
commit b897447296
5 changed files with 78 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
from __future__ import annotations
import os
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand
from taggit.models import Tag
@@ -200,8 +202,8 @@ class Command(BaseCommand):
]
)
# Admin user for E2E admin tests
if not User.objects.filter(username="e2e-admin").exists():
# Admin user for E2E admin tests — only when E2E_MODE is set
if os.environ.get("E2E_MODE") and not User.objects.filter(username="e2e-admin").exists():
User.objects.create_superuser(
username="e2e-admin",
email="e2e-admin@example.com",