oioioi.problems.problem_site
¶
Module Contents¶
Functions¶
|
A decorator that for each decorated function adds a corresponding |
|
|
|
Function checking if given problem has a ProblemStatement. |
|
|
|
Function checking if given problem has any downloadables. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Attributes¶
- oioioi.problems.problem_site.problem_site_tab(title, key, order=sys.maxsize, condition=None)[source]¶
A decorator that for each decorated function adds a corresponding tab to the global problem site that uses the function to generate its contents.
The decorated function should be somewhat similar to a view. It should take as its arguments a request and a problem, and return either a HttpResponseRedirect, a TemplateResponse or rendered html.
- Parameters
title – the tab’s title, will be shown on the site
key – will be used as a GET parameter to indicate the active tab
order – value determining the order of tabs
condition – a function receiving a request and problem that returns if the tab should be accessible for this request
- oioioi.problems.problem_site.check_for_statement(request, problem)[source]¶
Function checking if given problem has a ProblemStatement.
- oioioi.problems.problem_site.check_for_downloads(request, problem)[source]¶
Function checking if given problem has any downloadables.