Skip to content

Optimize: Add DB Index for Problem sorting#5

Open
whlongg wants to merge 2 commits intomasterfrom
fix/TASK-20260204
Open

Optimize: Add DB Index for Problem sorting#5
whlongg wants to merge 2 commits intomasterfrom
fix/TASK-20260204

Conversation

@whlongg
Copy link
Owner

@whlongg whlongg commented Feb 7, 2026

Automated fix for TASK-20260204.

@whlongg
Copy link
Owner Author

whlongg commented Feb 10, 2026

@codex

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec5db9ab3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

context['first_page_href'] = '.'
context['page_suffix'] = '#past-contests'
context['search_query'] = self.search_query
context.update(paginate_query_context(self.request))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Build contest pagination URLs from base route

Calling paginate_query_context(self.request) here derives page_prefix from request.path, so when a user is on the still-registered path form /contests/<int:page> (via paged_list_view in dmoj/urls.py), links are generated like /contests/2?page=3. InfinitePaginationMixin.paginate_queryset prioritizes self.kwargs['page'] over request.GET['page'], so those links keep rendering page 2 and pagination controls stop working for path-based bookmarks/direct links.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants