feat: CMS Sitemap을 frontend 도메인 그룹으로 필터링#41
Merged
MU-Software merged 3 commits intomainfrom May 9, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
2025.pycon.kr,2026.pycon.kr등)이 단일 CMS 백엔드를 공유하면서 도메인별로 다른 sitemap을 노출해야 함.기존엔 한 sitemap 트리만 존재하여 도메인별 분리가 불가능.
변경 요약
1. 모델 / 마이그레이션
DomainGroup모델 신규 추가Sitemap.domain_groupFK (on_delete=PROTECT) 추가(domain_group, parent_sitemap, route_code)로 교체 — 그룹이 다르면 같은route_code허용DomainGroup/HistoricalDomainGroup생성 +Sitemap.domain_group을 일시 nullable로 추가2025년 PyConKR 홈페이지그룹 생성 후 기존 Sitemap 일괄 연결Sitemap.domain_group을 NOT NULL로 변경 + unique constraint 교체2. Public API (cms/views.py)
SitemapViewSet.list가 요청 도메인을 다음 우선순위로 추출하여 매칭되는 sitemap만 반환:?frontend-domain=query →X-Frontend-Domainheader →Origin→Referer3. Admin API (admin_api/)
DomainGroupAdminViewSet신규 (/v1/admin/cms/domain-group/)DomainGroupAdminSerializer.validate_domains:HOSTNAME_REGEX)SitemapAdminSerializer에domain_group필드 노출,?domain_group=<uuid>필터 지원