From 50dcf1c8e26577652b90430a36f8114a2a1714c2 Mon Sep 17 00:00:00 2001 From: pmc <740076875@qq.com> Date: Fri, 8 May 2026 10:14:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(03-01):=20=E5=9C=A8=20qy=5Flty/urls.py=20?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=20/api/credential-slot/=20=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - imports 段追加 from aiapp.views import CredentialSlotClientView - api_urlpatterns 列表在 common/upload/ 与 v1/admin/ 之间插入新路由 path('credential-slot/', CredentialSlotClientView.as_view(), name='client_credential_slot') - 最终 URL: /api/credential-slot/(顶层 api_urlpatterns,非任何 sub-include) - resolve('/api/credential-slot/') 返回 CredentialSlotClientView,反向解析返回 /api/credential-slot/ - python manage.py check 通过(仅遗留 staticfiles.W004 与本 plan 无关) CRED-05 落地步骤 2/3 --- qy_lty/qy_lty/urls.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qy_lty/qy_lty/urls.py b/qy_lty/qy_lty/urls.py index bcc43c0..758775b 100644 --- a/qy_lty/qy_lty/urls.py +++ b/qy_lty/qy_lty/urls.py @@ -24,6 +24,7 @@ from drf_yasg import openapi from rest_framework import permissions import logging from common.views import upload_file +from aiapp.views import CredentialSlotClientView logger = logging.getLogger(__name__) logger.info('start at fengye urls') @@ -55,6 +56,8 @@ api_urlpatterns = [ path('achievement/', include('achievement_app.urls')), # 成就系统API path('food/', include('food_app.urls')), # 食物管理API path('common/upload/', upload_file, name='file-upload'), + # Phase 3 — 客户端通用凭据槽位读取接口(CRED-05,明文返回) + path('credential-slot/', CredentialSlotClientView.as_view(), name='client_credential_slot'), # 管理员API接口路径(v1版本) path('v1/admin/', include('userapp.admin_urls')), ]