Region Condition

Region Condition Actions

class integreat_cms.cms.views.region_condition.region_condition_actions.RegionConditionResource(**kwargs)[source]

Bases: ModelResource

A resources class that connects to the django-import-export library. It represents the to-be exported status of all regions.

static dehydrate_num_broken_links(region: Region) int[source]
Parameters:

region (Region) – The region

Returns:

The number of broken links

Return type:

int

static dehydrate_num_languages_besides_root_language(region: Region) int[source]
Parameters:

region (Region) – The region

Returns:

The number of languages besides the root language

Return type:

int

static dehydrate_num_low_hix_pages(region: Region) int[source]
Parameters:

region (Region) – The region

Returns:

The number of page translations with low hix value

Return type:

int

static dehydrate_num_outdated_pages(region: Region) int[source]
Parameters:

region (Region) – The region

Returns:

The number of outdated pages

Return type:

int

static dehydrate_num_pages(region: Region) int[source]
Parameters:

region (Region) – The region

Returns:

The number of pages in this region

Return type:

int

static dehydrate_num_pages_with_missing_or_outdated_translation(region: Region) int[source]
Parameters:

region (Region) – The region

Returns:

The number of pages with at least one missing or outdated translation

Return type:

int

get_instance(*args: Any, **kwargs: Any) Any[source]

See import_export.resources.Resource.get_instance()

Parameters:
  • args (Any)

  • kwargs (Any)

Return type:

Any

import_data(*args: Any, **kwargs: Any) Any[source]

See import_export.resources.Resource.import_data()

Parameters:
  • args (Any)

  • kwargs (Any)

Return type:

Any

import_row(*args: Any, **kwargs: Any) Any[source]

See import_export.resources.Resource.import_row()

Parameters:
  • args (Any)

  • kwargs (Any)

Return type:

Any

save_instance(*args: Any, **kwargs: Any) Any[source]

See import_export.resources.Resource.save_instance()

Parameters:
  • args (Any)

  • kwargs (Any)

Return type:

Any

integreat_cms.cms.views.region_condition.region_condition_actions.export_region_conditions(request: HttpRequest, file_format: str) HttpResponse[source]

Creates a data export summarizing the condition of all regions

Parameters:
  • request (HttpRequest) – The current request

  • file_format (str) – The file format to export

Returns:

A response containing the export data

Return type:

HttpResponse

Region Condition View

class integreat_cms.cms.views.region_condition.region_condition_view.RegionConditionView(**kwargs)[source]

Bases: TemplateView

View to analyze the condition of all regions

template_name = 'region_condition/region_condition.html'[source]

The template to render (see TemplateResponseMixin)