feat: 支持项目库自定义技术选型
This commit is contained in:
+9
-1
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user