feat: add 18 independent industry demo templates

This commit is contained in:
2026-11-03 22:33:03 +08:00
parent 1d08bdb6a5
commit 2b60c0d5e0
7 changed files with 632 additions and 1 deletions
@@ -0,0 +1,15 @@
from django.core.exceptions import ValidationError
from django.core.management.base import BaseCommand, CommandError
from apps.core.industry_templates import seed_industry_templates
class Command(BaseCommand):
help = "创建已配置行业的独立演示模板;只补齐缺失内容,不修改默认站点。"
def handle(self, *args, **options):
try:
created = seed_industry_templates()
except ValidationError as error:
raise CommandError(";".join(error.messages)) from error
self.stdout.write(self.style.SUCCESS(f"行业演示模板已就绪,新增 {len(created)} 个页面。"))