adhocracy_core.catalog.adhocracy module

Adhocracy catalog and index views.

class Reference(**kw)[source]

Bases: substanced.catalog.factories.IndexFactory

TODO: comment.

index_type

alias of ReferenceIndex

class AdhocracyCatalogIndexes[source]

Bases: object

Default indexes for the adhocracy catalog.

Indexes starting with private_ are private (not queryable from the frontend).

tag = <substanced.catalog.factories.Keyword object>
private_visibility = <substanced.catalog.factories.Keyword object>
badge = <substanced.catalog.factories.Keyword object>
item_badge = <substanced.catalog.factories.Keyword object>
title = <substanced.catalog.factories.Field object>
rate = <substanced.catalog.factories.Field object>
rates = <substanced.catalog.factories.Field object>
comments = <substanced.catalog.factories.Field object>
controversiality = <substanced.catalog.factories.Field object>
creator = <substanced.catalog.factories.Field object>
item_creation_date = <substanced.catalog.factories.Field object>
workflow_state = <substanced.catalog.factories.Field object>
reference = <adhocracy_core.catalog.adhocracy.Reference object>
user_name = <substanced.catalog.factories.Field object>
private_user_email = <substanced.catalog.factories.Field object>
private_user_activation_path = <substanced.catalog.factories.Field object>
private_service_konto_userid = <substanced.catalog.factories.Field object>
index_creator(resource, default) → str[source]

Return creator userid value for the creator index.

index_item_creation_date(resource, default) → str[source]

Return creator userid value for the creator index.

index_visibility(resource, default) → [<class 'str'>][source]

Return value for the private_visibility index.

Te return value will be one of [visible], [hidden]

index_title(resource, default) → str[source]

Return the value of field name ` title`.

index_rate(resource, default) → int[source]

Return the value of field name rate for IRate resources.

index_rates(resource, default) → int[source]

Return aggregated values of referenceing IRate resources.

Only the LAST version of each rate is counted.

index_controversiality(resource, default) → int[source]

Return metric based on number up/down rates and comments.

Only the LAST version of each rate is counted.

index_comments(resource, default) → int[source]

Return aggregated values of comments below the item parent of resource.

Only the LAST version of each rate is counted.

index_tag(resource, default) → [<class 'str'>][source]

Return value for the tag index.

index_badge(resource, default) → [<class 'str'>][source]

Return value for the badge index.

index_item_badge(resource, default) → [<class 'str'>][source]

Find item and return its badge names for the item_badge index.

index_workflow_state(resource, default) → str[source]

Return value for the workflow_state index.

index_workflow_state_of_item(resource, default) → [<class 'str'>][source]

Find item and return it`s value for the workflow_state index.

index_user_name(resource, default) → str[source]

Return value for the user_name index.

index_user_email(resource, default) → str[source]

Return value for the private_user_email index.

index_user_activation_path(resource, default) → str[source]

Return value for the private_user_activationpath index.

index_service_konto_userid(resource, default) → str[source]

Return value for the service konto index.

includeme(config)[source]

Register adhocracy catalog factory.