Community¶
Community¶
-
class
policyengine.models.
Community
(*args, **kwargs)¶ A Community represents a group of users. They may exist on one or more online platforms.
-
get_roles
()¶ Returns a QuerySet of all roles in the community.
-
get_platform_policies
(is_active=True)¶ Returns a QuerySet of all platform policies in the community.
-
get_constitution_policies
(is_active=True)¶ Returns a QuerySet of all constitution policies in the community.
-
get_trigger_policies
(is_active=True)¶ Returns a QuerySet of all trigger policies in the community.
-
get_documents
(is_active=True)¶ Returns a QuerySet of all documents in the community.
-
CommunityPlatform¶
-
class
policyengine.models.
CommunityPlatform
(*args, **kwargs)¶ A CommunityPlatform represents a group of users on a single platform.
-
platform
= None¶ The name of the platform (‘Slack’, ‘Reddit’, etc.).
-
community_name
¶ The name of the community.
-
community
¶ The
Community
that this CommunityPlatform belongs to.
-
initiate_vote
(proposal, users=None)¶ Initiates a vote on whether to pass the action that is currently being evaluated.
- Parameters
proposal – The
Proposal
that is being run.users –
users who should be notified. (The) –
-
get_roles
()¶ Returns a QuerySet of all roles in the community.
-
get_users
(role_names=None)¶ Returns a QuerySet of all users in the community on this platform.
-