Custom tags for Django templates

See the official Django documentation.

cube.templatetags.cube_tags.elided_page_range(page_obj, on_each_side=2, on_ends=1)

Page numbers around the current one, None where pages are skipped.

cube.templatetags.cube_tags.licenseAllowedCSS(license: License)

Returns the appropriated bulma CSS class according to license policy.

Parameters:

license (License) – A License object

Returns:

A CSS string

Return type:

string

cube.templatetags.cube_tags.licenseCopyleftCSS(license: License)

Returns the appropriated bulma CSS class according to license copyleft.

Parameters:

license (License) – A License object

Returns:

A CSS string

Return type:

string

cube.templatetags.cube_tags.licenseFOSSCSS(license: License)

Returns the appropriated bulma CSS class according to license foss.

Parameters:

license (License) – A License object

Returns:

A CSS string

Return type:

string

cube.templatetags.cube_tags.licenseReviewCSS(license: License)

Returns the appropriated bulma CSS class according to license review.

Parameters:

license (License) – A License object

Returns:

A CSS string

Return type:

string