Commit Graph

9879 Commits

Author SHA1 Message Date
Evan
af8bf0cd01 Fix AttributeError when rendering translated problem PDFs 2023-08-24 02:42:52 +00:00
int-y1
ee60a175f3 Fix filtering problems by full AC 2023-08-23 19:02:27 +00:00
Guanzhong Chen
89fec36398
Revert "Change "Refresh" to "Edit" 2FA on profile page" (#2270)
This reverts commit b698088b50.
2023-07-12 00:25:42 -04:00
Anthony Chen
b698088b50 Change "Refresh" to "Edit" 2FA on profile page 2023-07-12 01:19:47 +00:00
jazyz
64a1eca408 Sort Organizations by Name
Closes #2190
2023-07-12 01:09:52 +00:00
Roger Fu
3f5212fdcb Fix newsletter message template URL 2023-07-09 20:51:53 +00:00
Tudor Brindus
ddc624b602 Relabel the version matrix page to just "Versions" 2023-06-11 20:57:44 -04:00
Andrew
146d9ea16f
Make "Contest Ends..." link to timeanddate.com of contest end time instead of start time
Fixes #2027.
2023-06-11 20:57:02 -04:00
Le Bao Hiep
d98db84cdf UserList: sort users by id 2023-05-27 23:14:54 +00:00
Tudor Brindus
81f3c90ffa
bleach: allow img[align] by default 2023-04-08 09:33:35 -04:00
Evan
20dd8d4f78 Autofocus TOTP input field when logging in 2023-03-31 17:35:20 +00:00
Quantum
b424483db7 Allow value attribute for <li> tags 2023-03-19 05:13:53 +00:00
Quantum
ba9be235e5 Pin social-auth version to avoid CI breakage 2023-03-19 05:07:44 +00:00
Evan
81810eec69 Only use dark theme ace widget if experimental features are on; #2035 2023-03-11 23:56:41 +00:00
Tudor Brindus
3e597c03b1 Simplify PDF rendering backend
- Drop Puppeteer and Selenium backends
- "Inline" pdfoid, and move `pdf_problems.py` to `utils` + rename it
  `pdfoid.py`
- Drop a lot of pointless error checking; if we fail we'll want to raise
  a 500 regardless

Co-authored-by: Quantum <quantum2048@gmail.com>
2023-03-09 13:33:44 +02:00
Evan
9d90687d99 Fix PDF rendering for relative STATIC_URL 2023-03-06 20:39:16 +00:00
Tudor Brindus
473a77d824 Record request language in uWSGI logs 2023-03-06 06:10:06 +00:00
Tudor Brindus
1f2515515a Implement basic pdfoid-based renderer 2023-03-05 20:53:12 +00:00
Tudor Brindus
2605b3fa6f Only allow /users/ searching of listed users
Fixes #2212.
2023-03-05 20:46:14 +00:00
Tudor Brindus
30002c09ac texoid: response status is in status_code, not status 2023-03-05 17:27:26 +00:00
kiritofeng
529c05fa2a Fix bug with non-existent organizations 2023-03-05 02:46:51 +00:00
Quantum
a938ab00ab Define slug_url_kwarg for BaseOrganizationListView 2023-03-05 02:45:45 +00:00
int-y1
b8563cce26 Check for bad chars in problem title 2023-03-04 20:30:28 +00:00
Tudor Brindus
4fe609f740 Load PDF resources by URL
We were already not embedding all of them, and this is a prerequisite to making
use of pdfoid in the short term.
2023-03-04 20:27:58 +00:00
Tudor Brindus
ef6a3d4507 Drop PhantomJS PDF rendering callback
We no longer support the PhantomJS renderer.
2023-03-04 20:27:48 +00:00
Tudor Brindus
99c1ce01be Remove old PDF renderers
The SlimerJS and PhantomJS backends have not been used in many years, are
undocumented, and should not be used.
2023-02-26 19:39:08 +00:00
Quantum
9c9a6d556a Remove widgets/relative-time.html fragment 2023-02-23 05:52:55 +00:00
Quantum
08bcb3c231 Remove user/link.html fragment 2023-02-23 05:52:55 +00:00
Quantum
eda67c54e2 Rework misc config to run exactly one query
There should never be that much stuff in MiscConfig, so let's just read
it all and deal with it in python instead of trying to run one query
for each item of interest and poorly cache it.

This PR also moved MiscConfigDict into a middleware so it can be used
outside of templates.
2023-02-23 04:10:57 +00:00
Quantum
6ecec69904 Report username to uwsgi as a log variable 2023-02-22 06:10:27 +00:00
Tudor Brindus
2f084127c9 Prefetch problem group names for authored problems 2023-02-22 06:04:15 +00:00
Quantum
c86a82ebd5 Use select_related in OrganizationRequestBaseView 2023-02-22 04:44:50 +00:00
Quantum
cda99a631d Fix infinite paginator collections.abc import 2023-02-21 00:57:33 +00:00
Quantum
0c5534e4a6 Stop using distinct on get_visible_problems 2023-02-20 23:45:04 +00:00
Quantum
9c1f496fa0 Use faster organization check for get_visible_problems 2023-02-20 23:45:04 +00:00
Quantum
bc91872dbf Use faster author/curator/tester check for get_visible_problems 2023-02-20 23:25:35 +00:00
Quantum
a4c9940052 Use memo_lazy for submission page ID lists 2023-02-20 22:15:41 +00:00
Quantum
256875062b Add tests for memo_lazy helper function 2023-02-20 22:15:41 +00:00
Quantum
02944e3fb0 Add memo_lazy helper function 2023-02-20 22:15:41 +00:00
Quantum
e82687d563 Optimize user pp breakdown chart query 2023-02-20 21:22:29 +00:00
Quantum
9ce1077a2b Drop submission indexes that are prefixes of other indexes 2023-02-20 07:21:06 +00:00
Quantum
b55a5a8ecd Add index for contest problem submission rankings 2023-02-20 07:03:11 +00:00
Quantum
31f897bdde Store revision count on comment model 2023-02-20 05:55:04 +00:00
Quantum
150cec8b79 Create more submission indexes for improved performance
Effects:

* filtered main submission result chart from ~4 s to ~1 s
* helloworld result chart from ~100 ms to ~10 ms
* no more index_merge queries for `user_attempted_ids` and
  `user_completed_ids`
2023-02-19 20:04:17 +00:00
Quantum
d9a454306c Fix manage.py sqlmigrate issues with squashed migration 2023-02-19 20:03:54 +00:00
Quantum
3496d199c6 Prevent user search from showing up on organization user list
It's broken and we'll need to figure out how to fix it later.
2023-02-18 22:44:15 +00:00
Quantum
f70d87ef8e Paginate organization user list page 2023-02-18 22:44:15 +00:00
Quantum
91d7ea613f Create BaseOrganizationListView for usable lists involving organizations 2023-02-18 22:44:15 +00:00
Tudor Brindus
6c2fe5cce8 Make PDF titles time/memory limit headers consistent
The regular problem page lowercases "limit".
2023-02-18 22:30:42 +00:00
Tudor Brindus
e8b938bdda
Fixup active tab having a pixel border drawn
Something regressed since this was fixed in b676a49.
2023-02-18 16:50:08 -05:00