toloka.client.project.view_spec.ClassicViewSpec.Assets
| Source code
Assets( self, *, style_urls: Optional[List[str]] = None, script_urls: Optional[List[str]] = None)
Links to external files.
You can link:
CSS libraries
JavaScript libraries
Toloka assets — libraries that can be linked using the $TOLOKA_ASSETS
path:
$TOLOKA_ASSETS/js/toloka-handlebars-templates.js
— Handlebars template engine.
$TOLOKA_ASSETS/js/image-annotation.js
— Image labeling interface. Note, that this library requires Handlebars and must be linked after it.
For more information, see Image with area selection.
Add items in the order they should be linked.
Parameters | Type | Description |
---|---|---|
style_urls | Optional[List[str]] | Links to CSS libraries. |
script_urls | Optional[List[str]] | Links to JavaScript libraries and Toloka assets. |
Examples:
from toloka.client.project.view_spec import ClassicViewSpecview_spec = ClassicViewSpec( ..., assets = ClassicViewSpec.Assets( script_urls = [ "$TOLOKA_ASSETS/js/toloka-handlebars-templates.js", "$TOLOKA_ASSETS/js/image-annotation.js", ] ))
Last updated: August 28, 2023