yuetsh 085110544d chore: 再清 6 处零引用的函数/类(-47 行)
utils/tasks.py            整个文件(delete_files)
  utils/async_helpers.py    async_cache_delete
  problem/utils.py          build_problem_template
  utils/shortcuts.py        build_query_string
  achievement/checker.py    get_or_create_stat
  problem/serializers.py    TemplateSerializer

delete_files 的唯一调用者是上一个 commit 删掉的 DownloadContestSubmissions
(`delete_files.send_with_options(args=(zip_path,), delay=300_000)`,生成 zip 后
延时清理)。django_dramatiq 按约定自动发现各 app 的 tasks.py,缺一个文件不报错,
已实跑确认 judge / achievement / flowchart 三处的 actor 都还在。

## 扫出来但**不能删**的,记在这里免得下次又查一遍

**achievement/metrics.py 的 18 个指标类**:静态扫描报"零引用",因为类名确实
从不被引用 —— 它们靠 `@metric(key, name)` 装饰器在**定义时**注册进
METRIC_REGISTRY。删掉会静默丢掉成就维度,而且不报错。运行时确认注册表里
18 个一个不少。

**async_cache_get / async_cache_set**:各 6 处引用,只有 delete 那个是死的。
**parse_problem_template**:5 处引用,和被删的 build_problem_template 只是名字像。

**User 模型上的 open_api / open_api_appkey / two_factor_auth / session_keys**:
删字段要迁移,会改生产库结构 —— 而新后端正是靠"库结构与旧后端逐列一致"才能
回滚(阶段 5 演练验证过)。切换完成之前不动。

## 验证

manage.py check 通过;起本地 Django + PostgreSQL 实跑 14 个端点全部 200
(前台 10 个 + 后台 4 个);ruff 全绿;行尾未被改动。

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