feat: 支持项目库自定义技术选型

This commit is contained in:
2026-11-26 20:45:14 +08:00
parent 0c4ff1df5e
commit ef79950a3f
4 changed files with 63 additions and 2 deletions
+9 -1
View File
@@ -2,6 +2,7 @@
import hmac
import json
import re
import time
from datetime import datetime, timezone as dt_timezone
from functools import wraps
@@ -572,7 +573,14 @@ def plan_save(request, slug):
item = item.strip()
if item and item not in stack:
stack.append(item[:40])
project.tech_stack = stack
# 自定义技术:逗号 / 中文逗号 / 换行分隔,去重后一并入库
raw_custom = (request.POST.get("custom_stack") or "").strip()
if raw_custom:
for item in re.split(r"[,,\n]+", raw_custom):
item = item.strip()
if item and item not in stack:
stack.append(item[:40])
project.tech_stack = stack[:40]
project.architecture = (request.POST.get("architecture") or "").strip()
project.non_goals = [
line.strip()[:160]