oioioi.dashboard.contest_dashboard

Module Contents

Classes

Functions

register_contest_dashboard_view([order, condition])

Decorator for a view, which registers it as a contest dashboard.

unregister_contest_dashboard_view(view)

Unregisters a contest dashboard view.

contest_dashboard_view(request)

Attributes

class oioioi.dashboard.contest_dashboard._ContestDashboardEntry(view, condition)[source]

Bases: object

oioioi.dashboard.contest_dashboard._contest_dashboard_registry[source]
oioioi.dashboard.contest_dashboard.register_contest_dashboard_view(order=sys.maxsize, condition=None)[source]

Decorator for a view, which registers it as a contest dashboard.

A view registered this way can be shown as the main page of the contest. If multiple views are registered, one with the lowest order for which the condition holds true is selected.

Parameters
  • order (int) – value determining the order in which the dashboard is selected

  • condition (oioioi.base.permissions.Condition) – decides if a dashboard can be selected

oioioi.dashboard.contest_dashboard.unregister_contest_dashboard_view(view)[source]

Unregisters a contest dashboard view.

Does nothing if not found.

Parameters

view – the dashboard view to unregister

oioioi.dashboard.contest_dashboard.contest_dashboard_view(request)[source]