Skip to content

Archive now shows on the results page#141

Open
ViktorKoL wants to merge 4 commits intomasterfrom
archive-on-result-page
Open

Archive now shows on the results page#141
ViktorKoL wants to merge 4 commits intomasterfrom
archive-on-result-page

Conversation

@ViktorKoL
Copy link
Copy Markdown
Contributor

Resolves #99.
The way contest and user is handled for the template context is changed slightly for the sake of convenience.

@ViktorKoL ViktorKoL requested a review from Aiq0 March 22, 2026 10:28
Comment thread seminare/rules/common.py Outdated
Comment on lines +138 to +140
ctx["sets"] = ProblemSet.objects.for_user(user, self.contest).order_by(
"-end_date", "-start_date"
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would prefer that to be separated to mixin class, as it is now used by more views

user = self.request.user
user = self.request.user
if user.is_authenticated:
assert isinstance(user, User)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe add else: user=None to keep previous logic (or add that type to rule engine methods)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the problem is we want a reference to user that ProblemSet.objects.for_user can use

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.

archive in result table

2 participants