oioioi.base.main_page
¶
Module Contents¶
Classes¶
Functions¶
|
Decorator for a view, which registers it as a main page. |
Unregisters a main page view. |
|
|
Attributes¶
- oioioi.base.main_page._main_page_registry¶
- oioioi.base.main_page.register_main_page_view(order=sys.maxsize, condition=None)[source]¶
Decorator for a view, which registers it as a main page.
A view registered this way can be shown as the main page of the website (at URL /). If multiple views are registered, one with the lowest
order
for which thecondition
holds true is selected.- Parameters:
order (int) – value determining the order in which the main page is selected
condition (
oioioi.base.permissions.Condition
) – decides if a main page can be selected