yuetsh 38f92ed911 chore: 删 11 个无引用序列化器;撤回一处误判的"修复"
## 撤回:增删题单题目本来就会重算进度,我诊断错了

上一个 commit 我给 ProblemSetProblemAdminAPI 的 post/delete 加了显式的
sync_all_progress_for_problemset,理由是"增删题目不重算进度"。**那是错的。**

problemset/signals.py 里有 post_save / post_delete 信号接收器,
在 ProblemSetProblem 变化时同步进度**并重算奖章**,且 apps.py 的 ready()
确实导入了 signals。我的显式调用只是让同一件事做两遍。

更该记住的是**为什么当时没发现**:那一版测试只看"进度有没有更新",
而信号和我的调用都会让它更新 —— 分不出是谁干的,所以照样是绿的。
这次的测试改成先撤掉调用再验,并直接断言信号已注册在 post_save/post_delete 上,
这样才真的有区分力。6/6 通过。

同一批修复里的另外 5 条经复核都成立,保留。特别是「移除用户留下孤儿奖章」——
signals.py 里**没有**针对 ProblemSetProgress 的 post_delete,那条必须自己清。

## 删无引用序列化器(-78 行)

全仓 106 个序列化器,11 个无任何引用:

  account:   FileUploadForm, GenerateUserSerializer, SSOSerializer,
             UserChangeEmailSerializer, UserChangePasswordSerializer,
             UsernameOrEmailCheckSerializer
  contest:   CreateContestAnnouncementSerializer, EditContestAnnouncementSerializer
  problem:   CreateProblemCodeTemplateSerializer
  flowchart: FlowchartSubmissionMergedSerializer, FlowchartSubmissionSummarySerializer

前 8 个是上一个 commit 删掉的视图留下的(FileUploadForm 正是
SimditorFileUploadAPIView 用的),后 3 个是原本就死的。
检测器同样做了自检:拿 3 个明确在用的序列化器反测,没有误判。
另外确认这 11 个都没有字符串形式的动态引用。

`ruff check .` 全绿。行尾未被改动(上一轮踩过这个坑,这次脚本里加了断言)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 07:19:02 -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