oioioi.publicsolutions.controllers
¶
Module Contents¶
Classes¶
ContestController mixin that sets up publicsolutions app. |
- class oioioi.publicsolutions.controllers.PublicSolutionsContestControllerMixin[source]¶
Bases:
object
ContestController mixin that sets up publicsolutions app.
- can_see_publicsolutions(request, round)[source]¶
Determines whether solutions for the round have been published.
- Return type
bool
- solutions_must_be_public(qs)[source]¶
This fuction takes for a parameter a queryset with submissions for published rounds.
It should return a filtered queryset with exactly these submissions for which solution is mandatorily public.
- solutions_may_be_published(qs)[source]¶
This fuction takes for a parameter a queryset with submissions for published rounds.
It should return a filtered queryset with exactly these submissions that a user can decide themself to (un)publish.
You can assume that none of given submissions meets :meth:’solutions_must_be_public’ predicate.
At the start these submission are unpublished.