feat: add 18 independent industry demo templates
This commit is contained in:
@@ -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)} 个页面。"))
|
||||
Reference in New Issue
Block a user