f7fbfdba7d
fix(submission): revert unnecessary CSRF exemption on FormatCodeAPI
...
The CSRF 403 error was expected Django behavior (no CSRF cookie in curl).
FormatCodeAPI should follow SubmissionAPI's pattern (APIView, not CSRF-exempt).
Verified with GET request: /api/format_code returns 405 (correct route resolution).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-14 08:02:06 -06:00
5cc5c64625
feat(submission): register /api/format_code route and fix CSRF exemption
...
Task 4: Register the FormatCodeAPI view to the /api/format_code endpoint.
Also fix: Make FormatCodeAPI extend CSRFExemptAPIView instead of APIView
so that the manual verification curl commands receive JSON responses
(login-required error) instead of HTML 403 Forbidden responses. This is
necessary for the view to work with the @login_required decorator which
expects to return JSON errors, not be blocked by CSRF middleware.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-14 07:57:24 -06:00
be1610faa6
feat(submission): add FormatCodeAPI view
2026-06-14 07:51:41 -06:00
2b65acf91a
update
2026-06-05 08:51:57 -06:00
b28301bbb1
fix
2026-06-04 05:31:23 -06:00
809673e64f
fix
2026-06-03 04:50:46 -06:00
d1fdbcf52b
fix
2026-06-02 23:13:06 -06:00
6ab2886f77
remove contest type
2026-05-26 23:10:27 -06:00
57c0572fd9
async
2026-05-26 21:25:26 -06:00
65c48437a9
fix
2026-05-24 20:44:02 -06:00
028ea6e5f9
fmt
2026-04-23 13:57:56 -06:00
24ff67ec0c
fix
2026-03-30 09:34:38 -06:00
3763032a9a
fix
2026-03-09 21:07:54 +08:00
05d46295a0
add today
2026-03-02 19:40:33 +08:00
ab9fe71fb0
update
2025-12-29 20:19:32 +08:00
03f1bfdf86
update
2025-10-23 12:42:24 +08:00
f0dc86265b
update
2025-10-23 09:36:03 +08:00
a6d76a64c4
重构用户权限
2025-09-25 18:41:23 +08:00
626d86d142
filter by language
2025-09-21 19:32:50 +08:00
450ee800f3
update
2025-04-14 12:41:00 +08:00
025276002d
在前台添加今日提交数
2025-04-14 12:36:46 +08:00
8d6e9ff1f9
fix
2025-04-13 12:16:02 +08:00
6a4e8c7700
隐藏所有的提交
2025-04-13 11:49:23 +08:00
virusdefender
a5f0c8eb31
remove celery and use dramatiq
2019-03-11 17:59:24 +08:00
virusdefender
6b7654a0c3
update to django 2.0
2019-03-11 11:25:10 +08:00
zema1
3406791d2a
fix a vulnerability in contest submission
2018-12-16 10:45:05 +08:00
zema1
03c68419b0
remove restriction when using open api
2018-12-16 10:36:43 +08:00
zema1
ab751ee4b5
Fixed : #164
2018-08-06 22:19:09 +08:00
virusdefender
83b81bf14b
disable ip throttling
2018-05-13 18:33:04 +08:00
virusdefender
072364497c
new throttling
2017-12-24 11:01:33 +08:00
zema1
417337c4d2
修复几处visible未过滤的问题
2017-12-15 20:54:30 +08:00
zema1
d9009fbbe1
fix ValueError in a contest when ip is limited
2017-12-11 10:07:55 +08:00
zema1
b5c0550652
use 'nginx' as nginx running user
2017-12-03 20:34:07 +08:00
zema1
a1eed315b4
支持非比赛submission的重判
2017-11-24 10:27:34 +08:00
zema1
45953b8f80
submission exists api
2017-11-23 19:11:12 +08:00
zema1
334b67488a
添加SPJ编译API
2017-11-16 22:12:17 +08:00
zema1
727fbf48d8
添加contest ip限制api;
...
OI problem的AC,total count也算入profile了
2017-11-10 20:00:00 +08:00
zema1
2d00ed802d
添加initinstall命令
2017-11-07 19:04:41 +08:00
zema1
37d6dd84ee
修复contest announcement的一些问题
2017-11-06 19:05:21 +08:00
zema1
aa4240790b
fix many bugs
2017-10-31 16:33:25 +08:00
zema1
728373a5ff
完善contest权限控制
2017-10-27 18:36:29 +08:00
zema1
1b0952cd0d
update settings
2017-10-23 10:47:26 +08:00
zema1
5d03ec5aab
add pick one api
2017-10-21 20:39:39 +08:00
zema1
f5566148bc
完善OI细则
2017-10-16 09:45:55 +08:00
zema1
2c5a1e42bf
support share submission
2017-10-15 18:36:55 +08:00
virusdefender
93bd77d8d8
bug fixes
2017-10-09 18:55:25 +08:00
zema1
d650252a1a
separate contest submission and regular submission
2017-09-30 10:26:54 +08:00
zema1
2a91fd5e9f
fix bugs due to problem id
2017-09-29 21:58:20 +08:00
zema1
51c229a2c5
merge problem and contest_problem
2017-09-24 09:48:17 +08:00
zema1
a3ca8b2336
Use signals to save ip, user_agent, last_login in sessions
2017-09-16 17:42:43 +08:00