yuetsh e42cfac3ce feat: 班级号位数不合法直接报错,规则收敛到一处
原先班级号位数不对是静默处理的:get_class_name 猜前几位,class_list
根本不校验,填错只表现为登录页班级下拉查不到人。现在两个入口都报错。

- get_class_name 先用 \d+ 抓全再判位数,不合法抛 APIError。不能直接用
  CLASS_NAME_RE 匹配,那样 ks251001 会"匹配成功"并悄悄取前 4 位,正是
  要避免的猜测
- CreateEditWebsiteConfigSerializer 加 validate_class_list
- 位数规则收敛到 utils/shortcuts 的 CLASS_NAME_MIN/MAX_DIGITS 和
  is_valid_class_name,两个调用方和错误文案都从常量拼

不以 ks+数字 开头的用户名(管理员、教师账号、kstest)仍返回 None 不报错,
只校验"看起来想当班级用户名"的。

批量导入的构造循环在 transaction.atomic() 之前,报错时一条都不入库。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 00:15:47 -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
2026-08-05 04:45:26 -06:00
2025-05-10 21:53:57 +08:00
2026-08-05 04:45:26 -06:00
2026-08-05 04:45:26 -06:00
2026-08-05 23:17:48 -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-09 02:01:17 -06: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