Register Missing Models in Django Admin (DiscoveredLicense, ProjectMessage, CodebaseRelation, Run, WebhookSubscription)

未关闭 适合新手
#2,329 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Rucha0901 已经在做这个了。

开始于 2026年11月14日。

  • #2330 来自 @Rucha0901 —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
django, python
领域
backend

调研方向

从 scanpipe/admin.py 开始,那里有现有的模型注册和 ProjectAdmin 的 list_display,并遵循 DiscoveredPackage 和 CodebaseResource 所用的模式。为 DiscoveredLicense、ProjectMessage、CodebaseRelation、Run 和 WebhookSubscription 注册带有列表显示、过滤器和搜索字段的管理配置,然后在 ProjectAdmin 中添加指向它们变更列表的链接。完成标准是每个模型都出现在 /admin/ 下,并且 Project 变更视图链接到许可证、消息、关系和运行的过滤列表。

由索引模型根据 Issue 内容生成。

描述

Describe the bug

In scanpipe/admin.py, the admin site registers Project, CodebaseResource, DiscoveredPackage, DiscoveredDependency, OriginMatch, and OriginDetermination.
However, several core models are not registered in the Django admin:

  • DiscoveredLicense
  • ProjectMessage
  • CodebaseRelation
  • Run
  • WebhookSubscription

Furthermore, ProjectAdmin.list_display only contains links for packages, dependencies, and resources, lacking links for licenses, messages, relations, and pipeline runs.

To Reproduce
  1. Enable Django admin in ScanCode.io.
  2. Navigate to /admin/.
  3. Observe that DiscoveredLicense, ProjectMessage, CodebaseRelation, Run, and WebhookSubscription are not listed or accessible.
  4. Open a Project change view and observe missing links for licenses, messages, relations, and runs.
Expected behavior

All primary models should be registered in the Django admin site with appropriate list displays, filters, and search fields. ProjectAdmin should provide filtered changelist links to view related licenses, messages, relations, and runs.

主要语言
Python
星标
226
派生
222
平均合并
1 天 5 小时
30 天内合并 PR
32

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aboutcode-org/scancode.io 的其他 Issue

查看 aboutcode-org/scancode.io 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。