:py:mod:`oioioi.dashboard.contest_dashboard` ============================================ .. py:module:: oioioi.dashboard.contest_dashboard Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.dashboard.contest_dashboard._ContestDashboardEntry Functions ~~~~~~~~~ .. autoapisummary:: oioioi.dashboard.contest_dashboard.register_contest_dashboard_view oioioi.dashboard.contest_dashboard.unregister_contest_dashboard_view oioioi.dashboard.contest_dashboard.contest_dashboard_view Attributes ~~~~~~~~~~ .. autoapisummary:: oioioi.dashboard.contest_dashboard._contest_dashboard_registry .. py:class:: _ContestDashboardEntry(view, condition) Bases: :py:obj:`object` .. py:data:: _contest_dashboard_registry .. py:function:: register_contest_dashboard_view(order=sys.maxsize, condition=None) 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. :param order: value determining the order in which the dashboard is selected :type order: int :param condition: decides if a dashboard can be selected :type condition: :class:`oioioi.base.permissions.Condition` .. py:function:: unregister_contest_dashboard_view(view) Unregisters a contest dashboard view. Does nothing if not found. :param view: the dashboard view to unregister .. py:function:: contest_dashboard_view(request)