yuetsh eed0e630e6 chore: 删掉 17 个确认无人调用的端点(净 -472 行)
阶段 0 盘点时判为 CUT 的 17 条,当时只在代码里标了 DEPRECATED(2026-05-26),
没删。这次删掉:15 个视图类整体移除,2 条只删 URL。

## 为什么有两条只能删 URL

ProblemSetProblemAPI 和 ProblemSetProgressAPI **各有一条在用的路径**:

  ProblemSetProblemAPI    /problemset/<id>/problems          在用
                          /problemset/<id>/problems/<pid>    废弃
  ProblemSetProgressAPI   /problemset/progress               在用
                          /problemset/<id>/progress          废弃

删类会直接搞挂"看题单题目"和"加入题单"。清单里记的是**路径**不是视图类,
这个区别不看一眼就动手会出事。

## 核实过程

不敢只信清单 —— 今天已经因为"读过文档还是漏了盲点"栽过一次(前端 /api2 前缀
漏改 5 处)。所以:

1. 用 ast(不是正则)建「视图类 → 它的所有 URL」映射,判定哪些类的全部 URL
   都废弃。正则版把 B 组算成 0 个,而我明知至少有 2 个 —— 那种"看起来干净"的
   结果最危险。
2. DEPRECATED 检测最初往前多看一行,把上一条的行内注释算到了下一条头上,
   于是 /hitokoto、/profile、/reset_password 被误判成废弃。这三个明显在用,
   才发现范围错了。
3. 按端点字符串精确搜整个 ojnext(覆盖 http.get、原生 fetch、独立 axios、
   模板插值),16/16 确认无调用。**并且用 5 个明确在用的端点反测了检测器本身** ——
   未经验证的检测器报"全部无调用"是没有意义的。

## 验证

起本地 Django + PostgreSQL 实跑 33 条断言,全过:
- 保留的端点还能用(13 条,含那两个"类保留"的路径,加入题单确认真的成功)
- 删掉的端点确实 404(17 条)
- reverse() 也解析不到了(3 条)

`ruff check .` 全绿(顺手清掉 44 个因此变成未使用的 import)。

## 一个差点造成的意外

脚本无条件重写所有 urls.py,把 class_pk/ 和 message/ 下三个 **CRLF** 文件
静默转成了 LF —— 内容没变但整文件显示为改动。已原样恢复,最终 diff 是
纯删除,零意外改动。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 06:59:00 -06:00
fix
2026-07-26 07:21:56 -06:00
2026-08-05 04:45:26 -06:00
2026-05-26 21:25:26 -06:00
2026-08-05 04:45:26 -06:00
2025-05-10 21:53:57 +08:00
fix
2026-08-06 08:25:48 -06:00
2026-08-05 04:45:26 -06:00
2026-08-05 04:45:26 -06:00
fix
2026-08-06 08:25:48 -06:00
2026-08-05 23:17:48 -06:00
fix
2026-08-06 08:36:01 -06:00
2026-08-05 04:45:26 -06:00
2017-01-24 13:36:28 +08:00
fix
2026-06-14 09:27:21 -06:00
2021-11-18 12:38:49 +08:00
2026-05-26 07:37:05 -06:00
2019-01-05 14:12:14 +08:00
2017-11-30 09:42:16 +08:00
2026-08-05 04:45:26 -06:00
2021-12-18 01:15:03 +08:00
2021-12-18 01:15:03 +08:00
2026-05-05 07:45:23 -06:00

OnlineJudge 2.0

Python Django Django Rest Framework Build Status

An onlinejudge system based on Python and Vue. Demo

中文文档

Overview

  • Based on Docker; One-click deployment
  • Separated backend and frontend; Modular programming; Micro service
  • ACM/OI rule support; realtime/non-realtime rank support
  • Amazing charting and visualization
  • Template-problem support
  • More reasonable permission control
  • Multi-language support: C, C++, Java, Python2, Python3
  • Markdown & MathJax support
  • Contest participants IP limit(CIDR)

Main modules are available below:

Installation

Follow me: https://github.com/QingdaoU/OnlineJudgeDeploy/tree/2.0

Documents

http://opensource.qduoj.com/

Screenshots

Frontend:

problem-list

problem-details

statistic-info

contest-list

You can control the menu and chart status in rankings.

acm-rankings

oi-rankings

status

status-details

user-home

Admin:

admin-users

judge-server

create-problem

create-contest

Browser Support

Modern browsers(chrome, firefox) and Internet Explorer 10+.

Thanks

  • I'd appreciate a star if you find this helpful.
  • Thanks to everyone that contributes to this project.
  • Special thanks to heb1c, who has given us a lot of suggestions.

License

MIT

Description
No description provided
Readme 12 MiB